Skip to content
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

doc: clarify the restrictions of catching an uncaughtException #5180

Closed
wants to merge 3 commits into from

Conversation

NoahRoseLedesma
Copy link
Contributor

This commit adds information regarding catching uncaughtExceptions to the process doc. As brought up in #5147 the documentation does not state the recursion guard implemented in 2b252ac.

@mscdex mscdex added doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. labels Feb 10, 2016
@jasnell
Copy link
Member

jasnell commented Feb 10, 2016

@nodejs/ctc ... thoughts?
LGTM

@mscdex
Copy link
Contributor

mscdex commented Feb 10, 2016

This might be worded better to simply say that if an exception is thrown from within an uncaughtException event handler, the process will die, and it is handled that way to avoid infinite recursion.

Also I'm not sure if it's really useful to suggest using something like process.nextTick() to avoid this since that could easily cause the same problem of creating an infinite loop of sorts.

@NoahRoseLedesma
Copy link
Contributor Author

Thanks for the clarification @mscdex ... I will revise my addition

@bnoordhuis
Copy link
Member

@NoahRoseLedesma Can you make sure to wrap lines at 80 columns while you're at it?

@NoahRoseLedesma
Copy link
Contributor Author

I have revised the entry and wrapped the text in 06f07a6

@indutny
Copy link
Member

indutny commented Feb 11, 2016

LGTM

@thefourtheye
Copy link
Contributor

LGTM. Should we give an example?

@benjamingr
Copy link
Member

LGTM, I'm -0 on an example. I wonder if die is good terminology here.

@bnoordhuis
Copy link
Member

I'd replace it with exit with a non-zero status code.

@benjamingr
Copy link
Member

Yes, exit/terminate with a non-zero status code sounds much better.

@NoahRoseLedesma
Copy link
Contributor Author

Alright, the latest commit changes the wording from die to exiting with a non zero exit code.

silverwind pushed a commit that referenced this pull request Feb 17, 2016
PR-URL: #5180
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
@silverwind
Copy link
Contributor

Thanks! Landed in c605c5d with slight modification to the commit title to fit 52 chars.

@silverwind silverwind closed this Feb 17, 2016
MylesBorins pushed a commit that referenced this pull request Feb 18, 2016
PR-URL: #5180
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
rvagg pushed a commit that referenced this pull request Feb 18, 2016
PR-URL: #5180
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this pull request Feb 18, 2016
PR-URL: #5180
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
@MylesBorins MylesBorins mentioned this pull request Feb 18, 2016
MylesBorins pushed a commit that referenced this pull request Mar 2, 2016
PR-URL: #5180
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants