-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
- Loading branch information
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 (internal/modules/cjs/loader.js:*) | ||
at Object.Module._extensions..js (internal/modules/cjs/loader.js:*) | ||
at Module.load (internal/modules/cjs/loader.js:*) | ||
at Function.Module._load (internal/modules/cjs/loader.js:*) | ||
at Module.require (internal/modules/cjs/loader.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
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