Skip to content

doc: clarify the restrictions of catching an uncaughtException#5180

Closed
NoahRoseLedesma wants to merge 3 commits intonodejs:masterfrom
NoahRoseLedesma:master
Closed

doc: clarify the restrictions of catching an uncaughtException#5180
NoahRoseLedesma wants to merge 3 commits intonodejs:masterfrom
NoahRoseLedesma:master

Conversation

@NoahRoseLedesma
Copy link
Copy Markdown

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
Copy Markdown
Member

jasnell commented Feb 10, 2016

@nodejs/ctc ... thoughts?
LGTM

@mscdex
Copy link
Copy Markdown
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
Copy Markdown
Author

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

@bnoordhuis
Copy link
Copy Markdown
Member

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

@NoahRoseLedesma
Copy link
Copy Markdown
Author

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

@indutny
Copy link
Copy Markdown
Member

indutny commented Feb 11, 2016

LGTM

@thefourtheye
Copy link
Copy Markdown
Contributor

LGTM. Should we give an example?

@benjamingr
Copy link
Copy Markdown
Member

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

@bnoordhuis
Copy link
Copy Markdown
Member

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

@benjamingr
Copy link
Copy Markdown
Member

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

@NoahRoseLedesma
Copy link
Copy Markdown
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
Copy Markdown
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