Commit 459b106
committed
repl: attach location info to syntax errors
Currently, when a file with a syntax error is imported in the
REPL, no information is provided on the error's location. This
commit adds the error's location to the stack trace.
Refs: #2762
Refs: #3411
Refs: #3784
PR-URL: #4013
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>1 parent 8ca412b commit 459b106Copy full SHA for 459b106
File tree
Expand file treeCollapse file tree
2 files changed
+40
-0
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+40
-0
lines changedOpen diff view settings
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
274 | 274 | |
275 | 275 | |
276 | 276 | |
| 277 | + |
277 | 278 | |
278 | 279 | |
279 | 280 | |
|
Collapse file
test/parallel/test-repl-syntax-error-stack.js
Copy file name to clipboard+39Lines changed: 39 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 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
0 commit comments