Libraryless. Click here for Pure Java version (2809L/17K).
1 | static volatile PersistableThrowable _handleException_lastException; |
2 | static L _handleException_onException = synchroList(ll((IVF1<Throwable>) lambda1 printStackTrace2)); |
3 | sbool _handleException_showThreadCancellations; |
4 | |
5 | svoid _handleException(Throwable e) { |
6 | _handleException_lastException = persistableThrowable(e); |
7 | |
8 | Throwable e2 = innerException(e); |
9 | if (e2.getClass() == RuntimeException.class && eq(e2.getMessage(), "Thread cancelled.") || e2 instanceof InterruptedException) { |
10 | if (_handleException_showThreadCancellations) |
11 | System.out.println(getStackTrace_noRecord(e2)); |
12 | ret; |
13 | } |
14 | |
15 | for (O f : cloneList(_handleException_onException)) try { |
16 | callF(f, e); |
17 | } catch e3 { |
18 | try { |
19 | printStackTrace2(e3); // not using pcall here - it could lead to endless loops |
20 | } catch e4 { |
21 | System.out.println(getStackTrace(e3)); |
22 | System.out.println(getStackTrace(e4)); |
23 | } |
24 | } |
25 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015952 |
Snippet name: | _handleException |
Eternal ID of this version: | #1015952/21 |
Text MD5: | d045ce5eef1c1c158ae04e9ded1dfe0d |
Transpilation MD5: | 608303ec00839cfcd6bed191edc65533 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-26 22:24:42 |
Source code size: | 934 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 546 / 699 |
Version history: | 20 change(s) |
Referenced in: | [show references] |