static template
A template of the error message of string type with the replaceable tags
Last updated
// Example usage.
import { CommonError } from '@angular-package/error';
// Change the template.
CommonError.template = `Problem({id}): {problem} => Fix: {fix}`;
// Extend the `CommonError` class.
class TestError<Id extends string> extends CommonError<Id> {}
// Returns
// Error: Problem(AE:427): The `age` parameter is wrong. => Fix: Provided `age`
// must be different type.
new TestError(
'The `age` parameter is wrong.', // Problem
'Provided `age` must be different type. ', // Fix
'AE:427' // Identification
);