typeError
TypeError convenience function: wrap the provided error and optionally raise.
Return
Wrapped TypeError, ready to be raised.
Parameters
Throwable error to wrap as a TypeError.
Whether to throw the error after wrapping. Defaults to false
.
TypeError convenience function: wrap the provided message and optional cause; then, optionally raise.
Return
Wrapped TypeError, ready to be raised.
Parameters
String message for this error.
Throwable error to wrap and consider the cause of this error.
Whether to throw the error after wrapping. Defaults to false
.
TypeError constructor for spec-compliant type errors which accept a code and message.
Return
Wrapped TypeError, ready to be raised.
Parameters
Code string for the error.
String message for this error.
Throwable error to wrap and consider the cause of this error.
Whether to throw the error after wrapping. Defaults to false
.