Commit 6ab2ff6
committed
util: inspect objects with throwing Symbol.toStringTag
`util.inspect()` should handle all kinds of input, even if it is
not well defined. Throwing is something that is meant to be worked
around in all known cases. This fixes issues inspecting objects
where accessing the Symbol.toStringTag would cause an error. The
symbol is just ignored in that case.
Refs: nodejs#55539
Refs: nodejs#555441 parent f1b56d6 commit 6ab2ff6
File tree
2 files changed
+14
-3
lines changed- lib/internal/util
- test/parallel
2 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1186 | 1186 | | |
1187 | 1187 | | |
1188 | 1188 | | |
1189 | | - | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
1190 | 1197 | | |
1191 | 1198 | | |
1192 | 1199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1646 | 1646 | | |
1647 | 1647 | | |
1648 | 1648 | | |
1649 | | - | |
| 1649 | + | |
1650 | 1650 | | |
1651 | 1651 | | |
1652 | 1652 | | |
| |||
1655 | 1655 | | |
1656 | 1656 | | |
1657 | 1657 | | |
1658 | | - | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
1659 | 1663 | | |
1660 | 1664 | | |
1661 | 1665 | | |
| |||
0 commit comments