ErrorHandler can not throw errors because it will unsubscribe itself from the error stream. Zones captures errors and feed it into NgZone, which than has a Rx Observable to feed it into ErrorHandler. If the ErroHandler throws, then Rx will teardown the observable which in essence causes the ErrorHandler to be removed from the error handling. This implies that the ErrorHandler can never throw errors. Closes #14949 Closes #15182 Closes #14316
This commit is contained in:

committed by
Chuck Jazdzewski

parent
492153a986
commit
77fd91d615
@ -383,7 +383,8 @@ export declare function enableProdMode(): void;
|
||||
|
||||
/** @stable */
|
||||
export declare class ErrorHandler {
|
||||
constructor(rethrowError?: boolean);
|
||||
constructor(
|
||||
deprecatedParameter?: boolean);
|
||||
handleError(error: any): void;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user