-
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.
src,lib: print prinstine source when source map source not found
Print unmapped source lines when the source map source is not found. Error stacks should be correctly mapped even when the source is absent. PR-URL: #44052 Refs: #44019 Reviewed-By: Ben Coe <[email protected]>
- Loading branch information
1 parent
b252f38
commit ee6412a
Showing
7 changed files
with
53 additions
and
7 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,10 @@ | ||
function Throw() { | ||
throw new Error('foo'); | ||
} | ||
|
||
Throw(); | ||
|
||
// To recreate: | ||
// | ||
// npx tsc --outDir test/fixtures/source-map --sourceMap test/fixtures/source-map/no-source.ts | ||
// rename the "source.[0]" to "file-not-exists.ts" |
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,6 @@ | ||
// Flags: --enable-source-maps | ||
|
||
'use strict'; | ||
require('../common'); | ||
|
||
require('../fixtures/source-map/no-source.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,17 @@ | ||
*no-source.js:2 | ||
throw new Error('foo'); | ||
^ | ||
|
||
Error: foo | ||
at Throw (*file-not-exists.ts:2:9) | ||
at Object.<anonymous> (*file-not-exists.ts:5:1) | ||
at Module._compile (node:internal/modules/cjs/loader:*) | ||
at Module._extensions..js (node:internal/modules/cjs/loader:*) | ||
at Module.load (node:internal/modules/cjs/loader:*) | ||
at Module._load (node:internal/modules/cjs/loader:*) | ||
at Module.require (node:internal/modules/cjs/loader:*) | ||
at require (node:internal/modules/cjs/helpers:*) | ||
at Object.<anonymous> (*source_map_no_source_file.js:6:1) | ||
at Module._compile (node:internal/modules/cjs/loader:*) | ||
|
||
Node.js * |