-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--enable-source-maps throws internal TypeError when throwing non-object value #38945
Labels
source maps
Issues and PRs related to source map support.
Comments
@targos @ColinTimBarndt acknowledged. We should catch and suppress this specific error. |
bcoe
added a commit
to bcoe/node-1
that referenced
this issue
Jun 13, 2021
If an error is thrown before a module is loaded, we attempt to cache source map against error object, rather than module object. We can't do this if the error is a primitive type Fixes nodejs#38945
danielleadams
pushed a commit
that referenced
this issue
Jun 22, 2021
If an error is thrown before a module is loaded, we attempt to cache source map against error object, rather than module object. We can't do this if the error is a primitive type Fixes #38945 PR-URL: #39025 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
richardlau
pushed a commit
that referenced
this issue
Jul 19, 2021
If an error is thrown before a module is loaded, we attempt to cache source map against error object, rather than module object. We can't do this if the error is a primitive type Fixes #38945 PR-URL: #39025 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
richardlau
pushed a commit
that referenced
this issue
Jul 20, 2021
If an error is thrown before a module is loaded, we attempt to cache source map against error object, rather than module object. We can't do this if the error is a primitive type Fixes #38945 PR-URL: #39025 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
foxxyz
pushed a commit
to foxxyz/node
that referenced
this issue
Oct 18, 2021
If an error is thrown before a module is loaded, we attempt to cache source map against error object, rather than module object. We can't do this if the error is a primitive type Fixes nodejs#38945 PR-URL: nodejs#39025 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What steps will reproduce the bug?
Run
node --enable-source-maps test.js
wheretest.js
has a SourceMap, it can be generated from this code:How often does it reproduce? Is there a required condition?
The thrown object must not be
typeof "object"
. When the error is thrown (and uncaught), throwing the error causes an internal error that does not expose any information about the source code that originally caused it.What is the expected behavior?
A correct stack trace should be generated either way.
What do you see instead?
The text was updated successfully, but these errors were encountered: