Added logger assert methods.

This commit is contained in:
Richard Moore 2020-07-13 07:24:57 -04:00
parent c304d37cbd
commit 619a8888eb
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

@ -224,6 +224,16 @@ export class Logger {
});
}
assert(condition: any, message: string, code?: ErrorCode, params?: any): void {
if (!!condition) { return; }
this.throwError(message, code, params);
}
assertArgument(condition: any, message: string, name: string, value: any): void {
if (!!condition) { return; }
this.throwArgumentError(message, name, value);
}
checkNormalize(message?: string): void {
if (message == null) { message = "platform missing String.prototype.normalize"; }
if (_normalizeError) {