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

This reverts commit 6559425b07.
This commit is contained in:
Miško Hevery 2017-03-15 13:56:24 -07:00 committed by Chuck Jazdzewski
parent 6772c913c7
commit 313158132d
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,7 @@ export class ErrorHandler {
*/
rethrowError: boolean;
constructor(rethrowError: boolean = false) { this.rethrowError = rethrowError; }
constructor(rethrowError: boolean = true) { this.rethrowError = rethrowError; }
handleError(error: any): void {
const originalError = this._findOriginalError(error);
@ -64,6 +64,8 @@ export class ErrorHandler {
errorLogger(this._console, 'ERROR CONTEXT', context);
}
// We rethrow exceptions, so operations like 'bootstrap' will result in an error
// when an error happens. If we do not rethrow, bootstrap will always succeed.
if (this.rethrowError) throw error;
}