Class: UnknownError
A fallback error thrown by any unknown sources or unexpected failure that are
not of NameError.
In this particular case, an origin remains useful as it provides details
on the sources and the true nature of the unexpected error.
At this point, deciding whether to exit the program or not depends on the
programmer.
Extends
Constructors
Constructor
new UnknownError(
error):UnknownError
Creates a new UnknownError with an optional error message.
Optionally, the original error revealing the true nature of the failure.
Parameters
error
ErrorMessage & object
Returns
UnknownError
Overrides
Properties
cause?
optionalcause?:unknown
Inherited from
message
message:
string
Inherited from
name
name:
string
Inherited from
origin?
readonlyoptionalorigin?:Error
The possible unknown error, with trace revealing its source and reason.
source
readonlysource:string|string[]
Inherited from
stack?
optionalstack?:string
Inherited from
type
readonlytype:NameErrorType
Inherited from
Accessors
hasMessage
Get Signature
get hasMessage():
boolean
Whether a message describing the failure exists.
Returns
boolean
Inherited from
sourceAsString
Get Signature
get sourceAsString():
string
The actual source input which caused the error.
Returns
string
Inherited from
Methods
toString()
toString():
string
Returns a string representation of the error.
Returns
string