We use our ErrorHandler
to handle warnings, errors and fatal errors,
which reacts appropriately and unified to the severity.
Therefore, this handler should always be used instead of throwing an error yourself.
Examples of incorrect code for this rule:
throw new Error('foo');
throw error;
Examples of correct code for this rule:
ErrorHandler.error({ code: FrontendErrorCodeEnum.BAD_HEX_COLOR, filename: 'ColorUtil.ts' });
For parts of the start-up process, for example our config.
The ErrorHandler
uses the config, and the config uses the ErrorHandler
.
This would create a recursive cycle.