Commit 425a354
Julien Gilli
domains: fix handling of uncaught exceptions
Fix node exiting due to an exception being thrown rather than emitting
an `'uncaughtException'` event on the process object when:
1. no error handler is set on the domain within which an error is thrown
2. an `'uncaughtException'` event listener is set on the process
Also fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and `--abort-on-uncaught-exception` is used.
Finally, change the behavior of --abort-on-uncaught-exception so that,
if the domain within which the error is thrown has no error handler, but
a domain further up the domains stack has one, the process will not
abort.
Fixes #3607 and #3653.
PR: #3654
PR-URL: #3654
Reviewed-By: Chris Dickinson <chris@neversaw.us>1 parent 1a21a53 commit 425a354Copy full SHA for 425a354
File tree
Expand file treeCollapse file tree
9 files changed
+808
-126
lines changedOpen diff view settings
Filter options
- lib
- src
- test
- parallel
Expand file treeCollapse file tree
9 files changed
+808
-126
lines changedOpen diff view settings
Collapse file
+20-13Lines changed: 20 additions & 13 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
27 | 27 | |
28 | 28 | |
29 | 29 | |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
30 | 35 | |
31 | | - |
| 36 | + |
32 | 37 | |
33 | 38 | |
34 | 39 | |
35 | 40 | |
36 | 41 | |
37 | 42 | |
38 | 43 | |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
43 | 44 | |
44 | 45 | |
45 | 46 | |
| ||
96 | 97 | |
97 | 98 | |
98 | 99 | |
99 | | - |
100 | | - |
101 | | - |
102 | | - |
103 | | - |
104 | | - |
105 | | - |
106 | | - |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
107 | 114 | |
108 | 115 | |
109 | 116 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
242 | 242 | |
243 | 243 | |
244 | 244 | |
| 245 | + |
245 | 246 | |
246 | 247 | |
247 | 248 | |
|
Collapse file
+42-6Lines changed: 42 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
951 | 951 | |
952 | 952 | |
953 | 953 | |
| 954 | + |
| 955 | + |
| 956 | + |
| 957 | + |
| 958 | + |
| 959 | + |
| 960 | + |
| 961 | + |
| 962 | + |
| 963 | + |
| 964 | + |
| 965 | + |
| 966 | + |
| 967 | + |
| 968 | + |
| 969 | + |
| 970 | + |
| 971 | + |
| 972 | + |
| 973 | + |
| 974 | + |
| 975 | + |
| 976 | + |
| 977 | + |
954 | 978 | |
955 | | - |
956 | 979 | |
957 | 980 | |
958 | 981 | |
959 | | - |
960 | | - |
| 982 | + |
| 983 | + |
961 | 984 | |
962 | 985 | |
963 | | - |
964 | | - |
| 986 | + |
| 987 | + |
| 988 | + |
| 989 | + |
| 990 | + |
| 991 | + |
| 992 | + |
| 993 | + |
| 994 | + |
| 995 | + |
| 996 | + |
| 997 | + |
965 | 998 | |
966 | 999 | |
967 | 1000 | |
| ||
975 | 1008 | |
976 | 1009 | |
977 | 1010 | |
978 | | - |
| 1011 | + |
979 | 1012 | |
980 | 1013 | |
981 | 1014 | |
| ||
1004 | 1037 | |
1005 | 1038 | |
1006 | 1039 | |
| 1040 | + |
| 1041 | + |
| 1042 | + |
1007 | 1043 | |
1008 | 1044 | |
1009 | 1045 | |
|
Collapse file
+34Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
471 | 471 | |
472 | 472 | |
473 | 473 | |
| 474 | + |
| 475 | + |
| 476 | + |
| 477 | + |
| 478 | + |
| 479 | + |
| 480 | + |
| 481 | + |
| 482 | + |
| 483 | + |
| 484 | + |
| 485 | + |
| 486 | + |
| 487 | + |
| 488 | + |
| 489 | + |
| 490 | + |
| 491 | + |
| 492 | + |
| 493 | + |
| 494 | + |
| 495 | + |
| 496 | + |
| 497 | + |
| 498 | + |
| 499 | + |
| 500 | + |
| 501 | + |
| 502 | + |
| 503 | + |
| 504 | + |
| 505 | + |
| 506 | + |
| 507 | + |
0 commit comments