diff --git a/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/102-uncaught-exceptions.md b/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/102-uncaught-exceptions.md index 40e8bcfc6..6fe184a02 100644 --- a/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/102-uncaught-exceptions.md +++ b/content/roadmaps/107-nodejs/content/103-nodejs-error-handling/102-uncaught-exceptions.md @@ -1 +1,10 @@ -# Uncaught exceptions \ No newline at end of file +# Uncaught Exceptions + +When a JavaScript error is not properly handled, an uncaughtException is emitted. These suggest the programmer has made an error, and they should be treated with the utmost priority. + +The correct use of 'uncaughtException' is to perform synchronous cleanup of allocated resources (e.g. file descriptors, handles, etc) before shutting down the process. It is not safe to resume normal operation after 'uncaughtException'. + +Free Content +Official Website +Let It Crash: Best Practices for Handling Node.js Errors on Shutdown +Uncaught Exceptions in Node.js