If symbol names array has been populated in source map, include original symbol name in error message. Fixes https://github.com/nodejs/node/issues/35325 PR-URL: https://github.com/nodejs/node/pull/36042 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
27 lines
334 B
JavaScript
27 lines
334 B
JavaScript
const functionA = () => {
|
|
functionB()
|
|
}
|
|
|
|
function functionB() {
|
|
functionC()
|
|
}
|
|
|
|
const functionC = () => {
|
|
functionD()
|
|
}
|
|
|
|
const functionD = () => {
|
|
(function functionE () {
|
|
if (Math.random() > 0) {
|
|
throw new Error('an error!')
|
|
}
|
|
})()
|
|
}
|
|
|
|
const thrower = functionA
|
|
|
|
try {
|
|
thrower()
|
|
} catch (err) {
|
|
throw err
|
|
}
|