★ Constructor
The `Error` object constructor
Error()
Creates the Error instance with the message built from the given described problem and its solution, optional explicit identification on the given or stored template.
constructor(
problem: string,
fix: string,
id?: Id,
template = Error.template
) {
super(problem, fix, id, template);
}Parameters
problem:string
Description of the problem of a string type.
fix:string
A solution to the given problem of a string type.
id?:Id
Optional unique identification to the given problem of generic type variable Id.
template:string=Error.template
A template of error message with the replaceable {problem}, {fix} and optional {id} tags. By default, the value is equal to the static property template.
Example usage
Last updated