diff options
author | Benjamin Gruenbaum <inglor@gmail.com> | 2015-06-25 09:17:21 +0300 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2015-07-03 15:22:27 -0600 |
commit | 0f09b8db28fcc56295d4346c98d6950fc3a6f86c (patch) | |
tree | 5f72be9130aec1212a34ef3b1cef3020257e860f /doc | |
parent | 9cd44bb2b683446531306bbcff8739fc3526d02c (diff) | |
download | android-node-v8-0f09b8db28fcc56295d4346c98d6950fc3a6f86c.tar.gz android-node-v8-0f09b8db28fcc56295d4346c98d6950fc3a6f86c.tar.bz2 android-node-v8-0f09b8db28fcc56295d4346c98d6950fc3a6f86c.zip |
doc: don't recommend domains for error handling
Remove the suggestion to use domains for exception handling. Add clarity
to "unhandledException".
Fixes: https://github.com/nodejs/io.js/issues/2055
PR-URL: https://github.com/nodejs/io.js/pull/2056
Reviewed-By: Trev Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/process.markdown | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/api/process.markdown b/doc/api/process.markdown index ebff3d6496..71c7d3cfcc 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -104,9 +104,6 @@ Example of listening for `uncaughtException`: Note that `uncaughtException` is a very crude mechanism for exception handling. -Don't use it, use [domains](domain.html) instead. If you do use it, restart -your application after every unhandled exception! - Do *not* use it as the io.js equivalent of `On Error Resume Next`. An unhandled exception means your application - and by extension io.js itself - is in an undefined state. Blindly resuming means *anything* could happen. @@ -114,6 +111,11 @@ is in an undefined state. Blindly resuming means *anything* could happen. Think of resuming as pulling the power cord when you are upgrading your system. Nine out of ten times nothing happens - but the 10th time, your system is bust. +`uncaughtException` should be used to perform synchronous cleanup before +shutting down the process. It is not safe to resume normal operation after +`uncaughtException`. If you do use it, restart your application after every +unhandled exception! + You have been warned. ## Event: 'unhandledRejection' |