Skip to content

Instantly share code, notes, and snippets.

Last active Feb 13, 2020
What would you like to do?
[ErrorWrapper.mjs] Error wrapper class - wrap errors like C♯! #error-handling
class ErrorWrapper extends Error {
constructor(message, inner_exception) {
this.inner_exception = inner_exception;
toString() {
return `${super.toString()}\n***Inner Exception ***\n${this.inner_exception}`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment