Commit 87fb1c2
committed
errors: make sure all Node.js errors show their properties
This improves Node.js errors by always showing the attached properties
when inspecting such an error. This applies especially to SystemError.
It did often not show any properties but now all properties will be
visible.
This is done in a mainly backwards compatible way. Instead of using
prototype getters and setters, the property is now set directly on the
error.
PR-URL: #29677
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>1 parent bf1727a commit 87fb1c2Copy full SHA for 87fb1c2
File tree
Expand file treeCollapse file tree
6 files changed
+103
-85
lines changedOpen diff view settings
Filter options
- lib/internal
- test
- message
- parallel
Expand file treeCollapse file tree
6 files changed
+103
-85
lines changedOpen diff view settings
Collapse file
+67-72Lines changed: 67 additions & 72 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | | - |
16 | | - |
17 | 15 | |
18 | 16 | |
19 | 17 | |
| ||
121 | 119 | |
122 | 120 | |
123 | 121 | |
124 | | - |
125 | | - |
126 | | - |
127 | | - |
128 | | - |
129 | | - |
130 | | - |
131 | | - |
132 | | - |
133 | | - |
134 | | - |
135 | 122 | |
136 | | - |
137 | 123 | |
138 | | - |
139 | | - |
140 | | - |
| 124 | + |
141 | 125 | |
142 | | - |
143 | | - |
144 | | - |
| 126 | + |
| 127 | + |
145 | 128 | |
146 | | - |
147 | | - |
| 129 | + |
| 130 | + |
148 | 131 | |
149 | | - |
150 | | - |
151 | | - |
152 | | - |
153 | | - |
154 | 132 | |
155 | | - |
156 | | - |
157 | | - |
158 | | - |
159 | | - |
160 | | - |
161 | | - |
162 | | - |
163 | | - |
164 | | - |
165 | | - |
166 | | - |
167 | | - |
168 | | - |
169 | | - |
170 | | - |
171 | | - |
172 | | - |
173 | | - |
174 | | - |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
175 | 143 | |
176 | | - |
177 | | - |
178 | | - |
179 | | - |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
180 | 154 | |
181 | | - |
182 | | - |
183 | | - |
184 | | - |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + |
185 | 174 | |
186 | | - |
187 | | - |
188 | | - |
| 175 | + |
| 176 | + |
| 177 | + |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
| 188 | + |
189 | 189 | |
190 | 190 | |
191 | 191 | |
192 | 192 | |
193 | 193 | |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
194 | 202 | |
195 | 203 | |
196 | 204 | |
| ||
221 | 229 | |
222 | 230 | |
223 | 231 | |
224 | | - |
225 | | - |
226 | | - |
227 | | - |
228 | | - |
229 | | - |
230 | | - |
231 | | - |
232 | | - |
233 | | - |
234 | | - |
235 | | - |
236 | | - |
| 232 | + |
237 | 233 | |
238 | 234 | |
239 | 235 | |
| ||
394 | 390 | |
395 | 391 | |
396 | 392 | |
397 | | - |
398 | 393 | |
399 | 394 | |
400 | 395 | |
|
Collapse file
test/message/internal_assert.out
Copy file name to clipboardExpand all lines: test/message/internal_assert.out+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | | - |
| 15 | + |
| 16 | + |
| 17 | + |
Collapse file
test/message/internal_assert_fail.out
Copy file name to clipboardExpand all lines: test/message/internal_assert_fail.out+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | | - |
| 16 | + |
| 17 | + |
| 18 | + |
Collapse file
test/parallel/test-dgram-socket-buffer-size.js
Copy file name to clipboardExpand all lines: test/parallel/test-dgram-socket-buffer-size.js+20-3Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
| 7 | + |
7 | 8 | |
8 | 9 | |
9 | 10 | |
| ||
22 | 23 | |
23 | 24 | |
24 | 25 | |
25 | | - |
| 26 | + |
26 | 27 | |
27 | 28 | |
28 | 29 | |
| ||
40 | 41 | |
41 | 42 | |
42 | 43 | |
43 | | - |
| 44 | + |
44 | 45 | |
45 | | - |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
46 | 63 | |
47 | 64 | |
48 | 65 | |
|
Collapse file
test/parallel/test-internal-errors.js
Copy file name to clipboardExpand all lines: test/parallel/test-internal-errors.js+6-6Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
82 | 82 | |
83 | 83 | |
84 | 84 | |
85 | | - |
| 85 | + |
86 | 86 | |
87 | | - |
| 87 | + |
88 | 88 | |
89 | 89 | |
90 | 90 | |
| ||
99 | 99 | |
100 | 100 | |
101 | 101 | |
102 | | - |
| 102 | + |
103 | 103 | |
104 | 104 | |
105 | 105 | |
106 | | - |
| 106 | + |
107 | 107 | |
108 | 108 | |
109 | 109 | |
| ||
114 | 114 | |
115 | 115 | |
116 | 116 | |
117 | | - |
| 117 | + |
118 | 118 | |
119 | 119 | |
120 | 120 | |
| ||
124 | 124 | |
125 | 125 | |
126 | 126 | |
127 | | - |
| 127 | + |
128 | 128 | |
129 | 129 | |
130 | 130 | |
|
Collapse file
test/parallel/test-repl-top-level-await.js
Copy file name to clipboardExpand all lines: test/parallel/test-repl-top-level-await.js+4-2Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
161 | 161 | |
162 | 162 | |
163 | 163 | |
164 | | - |
165 | | - |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
166 | 168 | |
167 | 169 | |
168 | 170 | |
|
0 commit comments