I have this simple function which should return true
I returns false though, but console debugger shows that this is the UIError object. Nevertheless:
exception.originalException instanceOf UIError
returns false ! I see in the debugger that it is indeed an UIError class. Why ?
UIError extends Error class
private isAnUIError(exception: any): boolean {
return (exception.originalException) instanceof UIError || exception instanceof UIError;
}
export class UIError extends Error {
constructor (private message: string) {
super();
this.message = message;
}