Commit 49745cd
committed
process: delay throwing an error using
This makes sure all warnings that were triggered before a deprecation
warning during the same tick are properly handled and logged.
It also guarantees that users can not catch the error anymore.
Fixes: #17871
PR-URL: #32312
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>throwDeprecation
1 parent 5d06a37 commit 49745cdCopy full SHA for 49745cd
File tree
Expand file treeCollapse file tree
2 files changed
+15
-5
lines changedOpen diff view settings
Filter options
- lib/internal/process
- test/parallel
Expand file treeCollapse file tree
2 files changed
+15
-5
lines changedOpen diff view settings
Collapse file
lib/internal/process/warning.js
Copy file name to clipboardExpand all lines: lib/internal/process/warning.js+7-2Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
126 | 126 | |
127 | 127 | |
128 | 128 | |
129 | | - |
130 | | - |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
131 | 136 | |
132 | 137 | |
133 | 138 | |
|
Collapse file
test/parallel/test-process-warning.js
Copy file name to clipboardExpand all lines: test/parallel/test-process-warning.js+8-3Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
38 | 38 | |
39 | 39 | |
40 | 40 | |
41 | | - |
42 | | - |
43 | | - |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
44 | 49 | |
45 | 50 | |
46 | 51 | |
|
0 commit comments