Skip to content

Instantly share code, notes, and snippets.

@tmatz
Last active August 20, 2022 16:01
Show Gist options
  • Save tmatz/7a8f8cba88a83b11b0f7247761289060 to your computer and use it in GitHub Desktop.
Save tmatz/7a8f8cba88a83b11b0f7247761289060 to your computer and use it in GitHub Desktop.
javascript CustomError
export class CustomError extends Error {
get name() {
return this.constructor.name
}
}
@tmatz
Copy link
Author

tmatz commented Aug 20, 2022

It is difficult more than I expected.

see https://github.com/adriengibrat/ts-custom-error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment