If the value is an Error, this returns the value. Otherwise, it creates a new Error with the stringified value as the message.
Error
Generated using TypeDoc
If the value is an
Error
, this returns the value. Otherwise, it creates a newError
with the stringified value as the message.