mirror of https://github.com/nodejs/node.git
28 lines
334 B
JavaScript
28 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
|
|
}
|