Commit b6a7052
lib: refactor unhandled rejection deprecation warning emission
Emit the deprecation warning in the `kDefaultUnhandledRejections`
case to reduce the number of branches on unhandled rejection mode -
there is now only one switch case on it.
Also rename `emitWarning()` to `emitUnhandledRejectionWarning()`
to avoid ambiguity with `process.emitWarning()`
PR-URL: #28258
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>1 parent 3a2e67b commit b6a7052Copy full SHA for b6a7052
File tree
Expand file treeCollapse file tree
2 files changed
+13
-15
lines changedOpen diff view settings
Filter options
- lib/internal/process
- test/message
Expand file treeCollapse file tree
2 files changed
+13
-15
lines changedOpen diff view settings
Collapse file
lib/internal/process/promises.js
Copy file name to clipboardExpand all lines: lib/internal/process/promises.js+13-14Lines changed: 13 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
126 | 126 | |
127 | 127 | |
128 | 128 | |
129 | | - |
| 129 | + |
130 | 130 | |
131 | 131 | |
132 | 132 | |
| ||
144 | 144 | |
145 | 145 | |
146 | 146 | |
147 | | - |
148 | 147 | |
149 | 148 | |
150 | 149 | |
151 | 150 | |
152 | | - |
153 | | - |
154 | | - |
155 | | - |
156 | | - |
157 | | - |
158 | | - |
159 | | - |
160 | | - |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
161 | 156 | |
162 | 157 | |
163 | 158 | |
| ||
186 | 181 | |
187 | 182 | |
188 | 183 | |
189 | | - |
| 184 | + |
190 | 185 | |
191 | 186 | |
192 | 187 | |
| ||
195 | 190 | |
196 | 191 | |
197 | 192 | |
198 | | - |
| 193 | + |
199 | 194 | |
200 | 195 | |
201 | 196 | |
202 | 197 | |
203 | | - |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
204 | 203 | |
205 | 204 | |
206 | 205 | |
|
Collapse file
test/message/unhandled_promise_trace_warnings.out
Copy file name to clipboardExpand all lines: test/message/unhandled_promise_trace_warnings.out-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | | - |
25 | 24 | |
26 | 25 | |
27 | 26 | |
|
0 commit comments