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).

1  
sS str_pcall(O o) {
2  
  try {
3  
    ret str(o);
4  
  } catch print e {
5  
    ret "[error in toString of " + className(o) + "]";
6  
  }
7  
}

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: 147 / 215
Referenced in: [show references]