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

18
LINES

< > TinyBrain | #1007912 - printStackTrace2 - put exception line last

JavaX fragment (include)

static Throwable printStackTrace2(Throwable e) {
  // we go to system.out now - system.err is nonsense
  print(getStackTrace2(e));
  ret e;
}

static void printStackTrace2() {
  printStackTrace2(new Throwable);
}

static void printStackTrace2(S msg) {
  printStackTrace2(new Throwable(msg));
}

/*static void printStackTrace2(S indent, Throwable e) {
  if (endsWithLetter(indent)) indent += " ";
  printIndent(indent, getStackTrace2(e));
}*/

Author comment

Began life as a copy of #1002288

download  show line numbers  debug dex   

Travelled to 2 computer(s): cfunsshuasjs, tvejysmllsmz

No comments. add comment

Snippet ID: #1007912
Snippet name: printStackTrace2 - put exception line last
Eternal ID of this version: #1007912/2
Text MD5: ae40ef20a46330161c2c5d9c03b99ab7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-16 00:20:10
Source code size: 458 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 35 / 98
Version history: 1 change(s)
Referenced in: [show]