Commit a7e206d
Add suppressed exception to original cause when calling Future.sync* (#14898)
Motivation:
The `Promise.sync` and `syncUninterruptibly` methods will rethrow any
exception that cause the promise to fail. This gives the stack trace of
the original failure, but people loose the stack trace telling which
specific sync call propagated the exception. This can make debugging
confusing and more difficult that necessary. We have to keep this
behavior by default for compatibility, but we can add the extra details as suppressed exception and so help with debugging.
Modification:
Add`CompletionException` when `sync` or `syncUninterruptibly` is called as suppressed exception to the original cause.
Result:
Easier to debug.
---------
Co-authored-by: Norman Maurer <[email protected]>1 parent e8b0009 commit a7e206d
File tree
2 files changed
+20
-4
lines changed- common/src/main/java/io/netty/util/concurrent
2 files changed
+20
-4
lines changedLines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
39 | 51 | | |
40 | | - | |
| 52 | + | |
41 | 53 | | |
42 | 54 | | |
43 | 55 | | |
| |||
49 | 61 | | |
50 | 62 | | |
51 | 63 | | |
| 64 | + | |
52 | 65 | | |
53 | 66 | | |
54 | 67 | | |
55 | | - | |
| 68 | + | |
56 | 69 | | |
57 | 70 | | |
58 | 71 | | |
| |||
70 | 83 | | |
71 | 84 | | |
72 | 85 | | |
73 | | - | |
| 86 | + | |
74 | 87 | | |
75 | 88 | | |
76 | 89 | | |
| |||
668 | 681 | | |
669 | 682 | | |
670 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
671 | 687 | | |
672 | 688 | | |
673 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
0 commit comments