Don't recommend domains for error handling#2056
Don't recommend domains for error handling#2056benjamingr wants to merge 1 commit intonodejs:masterfrom
Conversation
|
Not saying it's not, but it should be clear that unhandledException should not be used for error recovery. |
Improvement suggestions? Seems az clear as it gets to me :) |
|
The "On Error Resume Next" is a strange to me. I understand what it means but I had to google to know it is a VB concept. |
|
@targos , I actually didn't change that part but I quite like it, I understood it but I never professionally did VB. I don't mind changing it while I'm at it if you have a suggestion :) |
|
What about:
|
|
I'd rather not impose words like middleware that not everyone knows on the documentation, if someone is just now exploring what unhandledRejection is I'm not sure they'd understand that. |
|
Agree. What about:
|
This seems pretty strong already to me. Wouldn't you agree? |
|
Can anyone else LGTM and/or merge it? |
|
LGTM |
|
+1 |
doc/api/process.markdown
Outdated
There was a problem hiding this comment.
this sounds right but I might say:
Handling this type of exception recognizes an unrecoverable problem with the application, at which point it is time to both: restart the application and investigate further.
There was a problem hiding this comment.
"Recognizes an unrecoverable problem" sounds a bit unclear to me, do you mind rephrasing?
There was a problem hiding this comment.
hmm, if that's unclear, I guess the main point there is that such an exception shouldn't be held out as a crutch to blindly restart applications, carrying on as if nothing happened, but rather an occasion to re-evaluate some area that is unfinished or very likely broken
This PR closes nodejs#2055 by removing the suggestion to use domains for exception handling. Additionally clarify `unhandledException` a bit. PR-URL: nodejs#2056 Reviewed-By: Trev Norris <trev.norris@gmail.com> Reviewed-By: Chris Dickinson <chris@neversaw.us>
|
Sorry for the time it took, squished, added |
|
Landed with git commit message fix, and removal of trailing whitespace on 0f09b8d. |
Remove the suggestion to use domains for exception handling. Add clarity to "unhandledException". Fixes: nodejs#2055 PR-URL: nodejs#2056 Reviewed-By: Trev Norris <trev.norris@gmail.com> Reviewed-By: Chris Dickinson <chris@neversaw.us>
This PR closes #2055 by removing the suggestion to use domains for exception handling. Additionally clarify
unhandledExceptiona bit.PR-URL: #2056