From d06347c9a3d5b849e826824c3e781ba5f238fc23 Mon Sep 17 00:00:00 2001 From: Kalpit Shah Date: Thu, 13 Oct 2022 19:27:02 +0530 Subject: [PATCH] Add content for uncaught exceptions (#2473) --- .../102-uncaught-exceptions.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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