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

12
LINES

< > BotCompany Repo | #1022299 // hijackPrintWithStackTraces - get list of all prints as pair (text, strack trace)

JavaX fragment (include)

static LPair<S> hijackPrintWithStackTraces(O r) {
  new LPair<S> out;
  temp tempInterceptPrint(new F1<S, Bool>() {
    Bool get(S s) {
      if (nempty(s))
      out.add(pair(s, getStackTrace()));
      false;
    }
  });
  callF(r);
  ret out;
}

Author comment

Began life as a copy of #1011313

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022299
Snippet name: hijackPrintWithStackTraces - get list of all prints as pair (text, strack trace)
Eternal ID of this version: #1022299/2
Text MD5: 2185e5b9a14669b7839edb619683d995
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-27 18:23:05
Source code size: 258 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 289 / 293
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)