-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
errors: display original symbol name
If symbol names array has been populated in source map, include original symbol name in error message. Fixes #35325 PR-URL: #36042 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
- Loading branch information
1 parent
5f41f1b
commit c14512b
Showing
14 changed files
with
178 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var functionA=function(){functionB()};function functionB(){functionC()}var functionC=function(){functionD()},functionD=function(){if(0<Math.random())throw Error("an error!");},thrower=functionA;try{functionA()}catch(a){throw a;}; | ||
//# sourceMappingURL=enclosing-call-site.js.map | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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 | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Flags: --enable-source-maps | ||
|
||
'use strict'; | ||
require('../common'); | ||
require('../fixtures/source-map/enclosing-call-site-min.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
*enclosing-call-site.js:16 | ||
throw new Error('an error!') | ||
^ | ||
|
||
Error: an error! | ||
at functionD (*enclosing-call-site-min.js:1:156) | ||
-> (*enclosing-call-site.js:16:17) | ||
at functionC (*enclosing-call-site-min.js:1:97) | ||
-> (*enclosing-call-site.js:10:3) | ||
at functionB (*enclosing-call-site-min.js:1:60) | ||
-> (*enclosing-call-site.js:6:3) | ||
at functionA (*enclosing-call-site-min.js:1:26) | ||
-> (*enclosing-call-site.js:2:3) | ||
at Object.<anonymous> (*enclosing-call-site-min.js:1:199) | ||
-> (*enclosing-call-site.js:24:3) | ||
at Module._compile (node:internal/modules/cjs/loader:*) | ||
at Object.Module._extensions..js (node:internal/modules/cjs/loader:*) | ||
at Module.load (node:internal/modules/cjs/loader:*) | ||
at Function.Module._load (node:internal/modules/cjs/loader:*) | ||
at Module.require (node:internal/modules/cjs/loader:*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters