-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
Error.prepareStackTrace not called when --enable-source-maps #29994
Copy link
Copy link
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.errorsIssues and PRs related to JavaScript errors originated in Node.js core.Issues and PRs related to JavaScript errors originated in Node.js core.source mapsIssues and PRs related to source map support.Issues and PRs related to source map support.
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.errorsIssues and PRs related to JavaScript errors originated in Node.js core.Issues and PRs related to JavaScript errors originated in Node.js core.source mapsIssues and PRs related to source map support.Issues and PRs related to source map support.
Type
Fields
Give feedbackNo fields configured for issues without a type.
It seems that when
--enable-source-mapsis enabled, the way errors work is altered. For example, a globalError.prepareStackTracefunction is no longer called as part of the process.I know
--enable-source-mapsis experimental based on the docs, but cannot find any specific information on, for example, if this is an expected change to runtime behavior or not.Just glancing around at the source code, I believe that
internal/errors.jsis what is calling theError.prepareStackTracewhen defined, but the command line flag replaces the stack trace implementation to one that does not callError.prepareStackTraceany longer.