Commit b7696b4
events: give subclass name in unhandled 'error' message
For unhandled `'error'` events, include the constructor name for
subclasses of EventEmitter, if possible. This makes tracing errors
easier when both creation of the `Error` object and emitting it
happen in code that does not refer back to the event emitter.
PR-URL: #28952
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 925e40c commit b7696b4Copy full SHA for b7696b4
File tree
Expand file treeCollapse file tree
3 files changed
+30
-2
lines changedOpen diff view settings
Filter options
- lib
- test/message
Expand file treeCollapse file tree
3 files changed
+30
-2
lines changedOpen diff view settings
Collapse file
+8-2Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
136 | 136 | |
137 | 137 | |
138 | 138 | |
139 | | - |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
140 | 146 | |
141 | 147 | |
142 | 148 | |
| ||
170 | 176 | |
171 | 177 | |
172 | 178 | |
173 | | - |
| 179 | + |
174 | 180 | |
175 | 181 | |
176 | 182 | |
|
Collapse file
test/message/events_unhandled_error_subclass.js
Copy file name to clipboard+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
Collapse file
test/message/events_unhandled_error_subclass.out
Copy file name to clipboard+17Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
0 commit comments