mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 21:46:48 +00:00

Files in `node_modules` are not authored by the user directly and the original sources are less relevant to the user. Skipping source maps in `node_modules` improves the general performance. Add `module.setSourceMapsSupport(enabled, options)` to skip source maps in `node_modules` if it is needed. This moves all source maps related API to `node:module` and this a step to promote the source maps API to stable. PR-URL: https://github.com/nodejs/node/pull/56639 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
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
|
|
}
|