-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fatality of uncaught exceptions in NodeJS #6
Comments
I might be misunderstanding, but the readme seems perfectly accurate to me. In particular,
seems to exactly match what asap does. |
I do not think that the README is inaccurate, but I do agree that we should clarify what “as it does any unhandled exception” means for NodeJS, specifically with regard to our respect for domains. |
@domenic that part is fine, it's the rest that is untrue:
|
Oh hmm, looking at the code, you're right: https://github.com/kriskowal/asap/blob/master/asap.js#L30-L47 Weird. |
I don't have a strong opinion on which behavior is better, as I'm still holding out hope for removing all exception handling from asap. |
Oh, I see. Yeah, that’s different. |
ASAP is already at version 1.0.0, and I think documentation should correctly reflect the current state of the code. Apparently there will not be a consensus very soon, so I think we should fix the paragraph as soon as possible, and to revert it in future if needed. I am going to create a new branch for that. |
It seems I forgot to close this one. |
The paragraph about uncaught exceptions in the README.md says:
It explains correctly the behavior in browsers, but it is not true in NodeJS. In NodeJS, uncaught exceptions are fatal (exits the process immediately), unless domains (or the "uncaoughtException" event) are used. ASAP, currently follows such "error policy".
Now, we have two options: (1) to fix the paragraph in the README.md, or (2) to make ASAP behave in NodeJS exactly as in browsers, "braking" the "error policy" of NodeJS.
The text was updated successfully, but these errors were encountered: