Skip to content

Instantly share code, notes, and snippets.

@jinalshah999
Created January 30, 2021 11:51
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 jinalshah999/e130f020224a55c8e31f1b2587ddf7d4 to your computer and use it in GitHub Desktop.
Save jinalshah999/e130f020224a55c8e31f1b2587ddf7d4 to your computer and use it in GitHub Desktop.
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