From f5b226e353cc34eb0e51c372b81771488ce0b078 Mon Sep 17 00:00:00 2001 From: Jozias Martini Date: Thu, 1 Sep 2022 17:57:54 -0300 Subject: [PATCH] Update exception handling in JavaScript roadmap (#1657) --- .../100-exception-handling/readme.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/roadmaps/106-javascript/content/107-javascript-control-flow/100-exception-handling/readme.md b/content/roadmaps/106-javascript/content/107-javascript-control-flow/100-exception-handling/readme.md index d8e7f3d3c..c2843c187 100644 --- a/content/roadmaps/106-javascript/content/107-javascript-control-flow/100-exception-handling/readme.md +++ b/content/roadmaps/106-javascript/content/107-javascript-control-flow/100-exception-handling/readme.md @@ -1 +1,5 @@ -# Exception handling \ No newline at end of file +# Exception Handling + +In JavaScript, all exceptions are simply objects. While the majority of exceptions are implementations of the global Error class, any old object can be thrown. With this in mind, there are two ways to throw an exception: directly via an Error object, and through a custom object. (excerpt from Rollbar) + +Throwing Exceptions in JavaScript