new Exception(messageopt, stylesopt)
Constructs a new Exception instance.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | Error |
<optional> |
The error message or an Error object. |
styles |
string |
<optional> |
The styles to apply to the error message. |
Methods
toString() → {string}
Returns a string representation of the Exception.
Returns:
A string containing the name and message of the Exception.
- Type
- string