Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class MyError extends Error {}
try {
} catch(err) {
if ( == 'MyError') {
console.log("This is my error");
} else if ( == 'ReferenceError') {
console.log("Not my error. Ask the ReferenceError guys");
} else {
console.log("I have no idea");
throw err;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment