Added logger assert methods.
This commit is contained in:
parent
c304d37cbd
commit
619a8888eb
@ -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 {
|
checkNormalize(message?: string): void {
|
||||||
if (message == null) { message = "platform missing String.prototype.normalize"; }
|
if (message == null) { message = "platform missing String.prototype.normalize"; }
|
||||||
if (_normalizeError) {
|
if (_normalizeError) {
|
||||||
|
Loading…
Reference in New Issue
Block a user