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)

1  
static LPair<S> hijackPrintWithStackTraces(O r) {
2  
  new LPair<S> out;
3  
  temp tempInterceptPrint(new F1<S, Bool>() {
4  
    Bool get(S s) {
5  
      if (nempty(s))
6  
      out.add(pair(s, getStackTrace()));
7  
      false;
8  
    }
9  
  });
10  
  callF(r);
11  
  ret out;
12  
}

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: 215 / 220
Version history: 1 change(s)
Referenced in: [show references]