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

22
LINES

< > BotCompany Repo | #1009332 // _topLevelErrorHandling - also inherits thread info

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (9904L/54K).

static Runnable _topLevelErrorHandling(Runnable r) {
ifdef LeanMode
  ret r;
endifdef
ifndef LeanMode
  if (r == null) null;
  
  // maybe we don't want this anymore. just dm_current_generic()
  O info = _threadInfo();
  O mod = dm_current_generic();
  Runnable r2 = r;
  
  if (info != null || mod == null)
    r2 = r {
      temp (AutoCloseable) rcall enter(mod);
      _threadInheritInfo(info);
      r.run();
    };
  r2 = rPcall(r2);
  ret r2;
endifndef
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009332
Snippet name: _topLevelErrorHandling - also inherits thread info
Eternal ID of this version: #1009332/10
Text MD5: 89ba4eb62ba162038fdf7f1ced493bdb
Transpilation MD5: f3fb53eb53200b9ad85c9ca01f7dfe6f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-13 04:11:01
Source code size: 481 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 568 / 1665
Version history: 9 change(s)
Referenced in: [show references]