Created
January 30, 2021 11:51
-
-
Save jinalshah999/e130f020224a55c8e31f1b2587ddf7d4 to your computer and use it in GitHub Desktop.
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
class Helper { | |
static getException({error, message}) { | |
if(error instanceof EXCEPTION) { | |
return error; | |
} else { | |
console.error(error); | |
console.error(error.stack); | |
return new global.EXCEPTION('UnKnownError', message); | |
} | |
} | |
} | |
module.exports = Helper; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment