fix(core): ErrorHandler should not rethrow an error by default (#15077) (#15208)

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:
Miško Hevery
2017-03-16 12:58:41 -07:00
committed by Chuck Jazdzewski
parent 492153a986
commit 77fd91d615
5 changed files with 15 additions and 18 deletions

View File

@ -383,7 +383,8 @@ export declare function enableProdMode(): void;
/** @stable */
export declare class ErrorHandler {
constructor(rethrowError?: boolean);
constructor(
deprecatedParameter?: boolean);
handleError(error: any): void;
}