Error Handing Examples
by Shane Porter
JavaScript
function exceptionThrower() {
throw {
name: "ExceptionThrowerException",
message: "Bad things afoot"
};
//throw new Error("Bad things afoot");
}
try {
exceptionThrower();
} catch (e) {
console.log(e);
exceptionThrower();
} finally {
console.log("Finally...");
}