is no syntaxical ability to assign different handlers to different error types aside from experimental and presently removed Gecko extensions from many years ago. Instead, one can either propagate the error by using a throw statement inside the catch statement, or use multiple conditional cases. Let us compare an example in Java and its rough equivalents in JavaScript. // Example in Java try { Integer i = null; i.intValue(); // throws a NullPointerException } catch(NullPointerException error) { // Variable might be null } catch(ArithmeticException error) { // Handle problems with numbers } // Approximation #1 in JavaScript try { // Statements in which exceptions might be thrown var example = null; example.toString(); } catch(error) { if (error.type === "TypeError") { // Variable might be null } else if (error.type === "RangeError") { // Handle problems with numbers } } // Approximation #2 in JavaScript try { try { // Statements in which exceptions might be thrown var example = null; example.toString(); } catch(error) { if (error.type !== "TypeError") throw error; // Variable might be null } } catch(error) { if (error.type !== "RangeError") throw error; // Handle problems with numbers } Another aspect of exceptions are promises, which handle the exception asynchronously. Handling the exception asynchronously has the benefit that errors inside the error handler do not propagate further outwards. new Promise(function() { throw new Error("Example error!"); }).catch(function(err) { console.log("Caught ", err); }); Also observe how event handlers can tie into promises as well. addEventListener("unhandledrejection", function(event) { console.log(event.reason); event.preventDefault(); //prevent logging the error via console.error to the console--the default behavior }); new Promise(function() { throw new Error("Example error!"); }); Lastly, note that, as JavaScript uses mark-and-sweep garbage-collection, there is never any memory leakage from throw statements because the browser automatically cleans dead objects—even with circular references. try { // Statements in which exceptions might be thrown const obj = {}; obj.selfPropExample = obj; // circular reference throw obj; } catch(error) { // Statements that execute in the event of an exception } Lisp Common Lisp (ignore-errors (/ 1 0)) (handler-case (progn (print "enter an expression") (eval (read))) (error (e) (print e))) (unwind-protect (progn (print "enter an expression") (eval (read))) (print "This print will always be executed, similar to finally.")) Lua Lua uses the pcall and xpcall functions, with xpcall taking a function to act as a catch block. Predefined function function foo(x) if x then return x else error "Not