Runs Error.captureStackTrace
if running V8
to clean up the error stack trace.
Will return error
if an instance of Error
is passed;
otherwise, when lacking a create
function,
it will instantiate an Exception
and return it.
When a new Exception
is created, Exception.data
will be populated with error
.
a target object
an optional error returning function to run when error
is not an instance of Error
Normalizes an error -it assumes an instance of Error
is passed.
Guarantees the error will have a name
, message
, and stack
properties.
Generated using TypeDoc
A normalized
Error
. Seenormalize
.