Page cover

Overview

The `CommonError` abstract object to throw an identified error with a solution to the described problem

CommonError {}

The CommonError abstract object to throw an identified error with a solution to the described problem, additional type, and range built on the template.

common-error.class.ts

Accessors

public get fix(): string The getarrow-up-right accessor obtains a possible solution to the described problem by returning the #fix property of a specified object

public get id(): Id | undefined The getarrow-up-right accessor gets the error identification by returning the #id property of a specified object.

public get link(): string | undefined The getarrow-up-right accessor gets the link(to read more about the thrown error) by returning the #link property of a specified object.

public get message(): string The getarrow-up-right accessor gets the error message by returning the parent messagearrow-up-right property of the Errorarrow-up-right object.

public get problem(): string The getarrow-up-right accessor gets the problem by returning the #problem property of a specified object.

public get template(): string The getarrow-up-right accessor gets the template of the error message by returning the #template property of a specified object.

Properties

public static template: string A template of the error message of stringarrow-up-right type with the replaceable {problem}, {fix} and optional {id}, {link}, {max}, {min}, {type} tags.

#fix: string A privately stored possible solution to the described problem of a stringarrow-up-right type.

#id?: Id A privately stored unique identification of the described problem of generic type variable Id.

#link?: string The optional privately stored link of stringarrow-up-right type redirects to read more about the thrown error.

#problem: string A privately stored problem of a stringarrow-up-right type.

#template: string A string-typearrow-up-right privately stored template of the error message that contains replaceable required {fix}, {problem} and optional {id}, {max}, {min}, {type} tags.

Methods

protected static defineMessage(): string The static "tagarrow-up-right" method builds from the given values the error message of a stringarrow-up-right type on the template.

protected static isError(): value is CommonError<Id> Checks whether the value of any type is a this instance of any or the given identification.

Last updated

Was this helpful?