Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1034597 // str_pcall - str() + handle exception in toString

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5002L/27K).

sS str_pcall(O o) {
  try {
    ret str(o);
  } catch print e {
    ret "[error in toString of " + className(o) + "]";
  }
}

Author comment

Began life as a copy of #1001992

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034597
Snippet name: str_pcall - str() + handle exception in toString
Eternal ID of this version: #1034597/1
Text MD5: 485ac155e0d80b4893637feb713097cf
Transpilation MD5: 950bb627c5490e30485029adf480aea5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-19 08:35:58
Source code size: 130 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 145 / 211
Referenced in: [show references]