Constructor
The `CommonError` object constructor
CommonError()
constructor(
problem: string,
fix: string,
id?: Id,
template = CommonError.template,
additional?: { link?: string; max?: number; min?: number; type?: string }
) {
super(
CommonError.defineMessage`${problem}${fix}${id}${template}${additional}`
);
this.#fix = fix;
this.#id = id;
this.#link = additional?.link;
this.#problem = problem;
this.#template = template;
}Parameters
problem:string
fix:string
id?:Id
template:string=CommonError.template
additional: {link?:string; min?:number; max?:number; type?:string}
Example usage
Basic usage
id
id, template
id, template, additional{ min }
id, template, additional{ min, max }
id, template, additional{ min, max, type }
Last updated