Skip to content

de-mklinger/node-error-with-cause

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

error-with-cause

ErrorWithCause extends Error with a cause.

Deprecated. This package is useless since Nodejs 16.9. and for recent browsers. Use code like this instead:

new Error("my message", { cause: "whatever" })
try {
  // Try something
} catch (cause) {
  throw new Error("While trying something, this happened", {cause})
}

About

ErrorWithCause extends Error with a cause

Resources

License

Stars

Watchers

Forks

Packages

No packages published