Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions doc/api/process.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,18 @@ 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.

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'
Expand Down