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

9
LINES

< > BotCompany Repo | #1002197 // formatExceptionForUser

JavaX fragment (include)

// also logs full exception to console
static S formatExceptionForUser(Throwable e) {
  printStackTrace(e);
  S msg = unnull(e.getMessage());
  if (msg.indexOf("Error") < 0 && msg.indexOf("Exception") < 0)
    ret dropPrefix("java.lang.", str(e));
  else
    ret msg;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002197
Snippet name: formatExceptionForUser
Eternal ID of this version: #1002197/1
Text MD5: 9a5360ca19024a462ceaa309a682d7e2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-03-06 02:57:18
Source code size: 277 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 711 / 1723
Referenced in: [show references]