Exception

Exception

new Exception(messageopt, stylesopt)

Constructs a new Exception instance.

Description:
  • Constructs a new Exception instance.

Source:
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.

Description:
  • Returns a string representation of the Exception.

Source:
Returns:

A string containing the name and message of the Exception.

Type
string