-
Notifications
You must be signed in to change notification settings - Fork 93
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
Rethrow only on node v0.8. #19
Conversation
done! |
@raszi could you please review this? |
Actually I wanted to change the whole behavior on this. I started to reimplement the graceful cleanup with domains but it did not help. |
So I'll accept this I finish the work with that. |
Released as v0.0.22, thanks! |
Thank you! :) |
Correct me if I'm wrong... but doesn't this mean that if I use |
Ok, I saw the problem. It didn't happen in my code because I use mocha for testing (which have its own uncaughtException handler) and domains (which use uncaughtException). So, the error now it's not reported if there is no uncaughtException handler. |
The fix is changing that line into:
|
However, that fix do not change the issue of bad error reporting. I've noted in the code that there are both a |
See #21. In node 0.8 the |
This pull-request uses
process.versions.node
to detect if we are on node v0.8 and only in that case we rethrow after the'uncaughtException'
handler.This solves the problem in #14 in a much simpler way.