-
Notifications
You must be signed in to change notification settings - Fork 224
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
Fix exception not printed when debugging #219
Conversation
I think the problem with just setting Would it be possible to keep the current behavior if |
|
Unfortunately calling |
Is it really more often than not though? I think this problem only happens when you're printing large amounts of text (see nodejs/node#6456). Also, the switch from A possible workaround mentioned in the node issue I linked is to add |
|
I've updated the PR. |
source-map-support.js
Outdated
process.exit(1); | ||
} | ||
|
||
function shimEmitUncaughtException () { | ||
var origEmit = process.emit; | ||
process.on('uncaughtException', function(error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason for changing this? It will change the before behavior of not exposing us in process.listeners('uncaughtException')
. I'm not saying that one way or the other is better, but we could potentially break something that depended on it not showing up...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking over process.emit
seemed like overkill IMO and a non-standard way of doing it. Not directly related to this PR, however.
I've simplified the PR to just the necessary changes. |
Thank you! |
Published as |
This is based on my comment in PR #208 which caused exceptions not to be printed to the console when debugging (eg. using Chromium or VS Code). I've also simplified the code a bit.