Commit 1ec09b0
committed
src: don't print garbage errors
If JS throws an object whose toString() method throws, then Node
attempts to print an empty message, but actually prints garbage.
This commit checks for this case, and prints a message instead.
Fixes: #4079
PR-URL: #4112
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Chris Dickinson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>1 parent e6e7891 commit 1ec09b0
File tree
3 files changed
+15
-5
lines changed- src
- test
- fixtures
- parallel
3 files changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1511 | 1511 | | |
1512 | 1512 | | |
1513 | 1513 | | |
1514 | | - | |
1515 | | - | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
1516 | 1518 | | |
1517 | 1519 | | |
1518 | 1520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| |||
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | | - | |
| 71 | + | |
69 | 72 | | |
0 commit comments