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})
}