Skip to content

Instantly share code, notes, and snippets.

@helfi92
Last active April 22, 2019 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helfi92/8718899cc99002f7f5f211dc677ae80b to your computer and use it in GitHub Desktop.
Save helfi92/8718899cc99002f7f5f211dc677ae80b to your computer and use it in GitHub Desktop.
Error with reason
module.exports = class CustomError extends Error {
constructor(name, message) {
super();
this.name = name;
this.message = message;
this.stack = (new Error()).stack;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment