This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix exception output for module load exceptions
So instead of: node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ You will now see: path/to/foo.js:1 throw new Error('bar'); ^ This is a sub-set of isaacs patch here: #3235 The difference is that this patch purely adresses the exception output, but does not try to make any behavior changes / improvements.
- Loading branch information
Showing
5 changed files
with
20 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
before | ||
|
||
module.js:311 | ||
throw err; | ||
^ | ||
*test*message*stack_overflow.js:31 | ||
This comment has been minimized.
Sorry, something went wrong. |
||
function stackOverflow() { | ||
^ | ||
RangeError: Maximum call stack size exceeded |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
before | ||
|
||
module.js:311 | ||
throw err; | ||
^ | ||
*test*message*throw_custom_error.js:31 | ||
throw { name: 'MyCustomError', message: 'This is a custom message' }; | ||
^ | ||
MyCustomError: This is a custom message |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
before | ||
|
||
module.js:311 | ||
throw err; | ||
^ | ||
*/test/message/throw_non_error.js:31 | ||
throw { foo: 'bar' }; | ||
^ | ||
[object Object] |
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
While i get the expected result on amd64 or i386,
on arm "hard float" the stack overflow does not happen here :