Overview

The `Error` object

Error {}

The Error object is an extension of the CommonError class and is thrown when a runtime error occurs with a message built from a solution to the described problem but with additional identification, on the template.

Accessors

public get name(): string Error name of a string type, set to Error that is being thrown.

public get [Symbol.toStringTag](): string The get accessor, with the help of toStringTag, changes the default tag to 'Error' for an instance of Error.

Properties

public static template: string A template of the error message of string type with the replaceable {problem}, {fix} and optional {id} tags.

Methods

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.

public static isError(): value is Error<Id> Checks whether the value of any type is an instance of Error of any or the given identification.

Last updated