Last active
April 22, 2019 00:03
-
-
Save helfi92/8718899cc99002f7f5f211dc677ae80b to your computer and use it in GitHub Desktop.
Error with reason
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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