The `Error` object
Error {}
The Error object is an extension of the CommonError class and is thrown when a runtime error occurs with a messagearrow-up-right built from a solutionarrow-up-right to the described problemarrow-up-right but with additional identification, on the templatearrow-up-right.
Error
CommonError
error.class.ts
public get name(): string Error name of a stringarrow-up-right type, set to Errorarrow-up-right that is being thrown.
string
public get [Symbol.toStringTag](): string The getarrow-up-right accessor, with the help of toStringTagarrow-up-right, changes the default tag to 'Error' for an instance of Error.
get
toStringTag
'Error'
public static template: string A template of the error message of stringarrow-up-right type with the replaceable {problem}, {fix} and optional {id} tags.
{problem}
{fix}
{id}
public static define(): Error<Id> Defines the Error instance with the message built of the given required problem, fix and optional id on the template.
problem
fix
id
template
public static isError(): value is Error<Id> Checks whether the value of anyarrow-up-right type is an instance of Error of any or the given identification.
value
any
Last updated 3 years ago