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

Closes #14949
Closes #13159
Closes #8993
This commit is contained in:
Dzmitry Shylovich 2017-03-11 01:44:14 +03:00 committed by Chuck Jazdzewski
parent 920b3d259d
commit 1aebea52e1
1 changed files with 1 additions and 8 deletions

View File

@ -41,12 +41,7 @@ export class ErrorHandler {
*/
_console: Console = console;
/**
* @internal
*/
rethrowError: boolean;
constructor(rethrowError: boolean = true) { this.rethrowError = rethrowError; }
constructor(private rethrowError: boolean = false) {}
handleError(error: any): void {
this._console.error(`EXCEPTION: ${this._extractMessage(error)}`);
@ -71,8 +66,6 @@ export class ErrorHandler {
}
}
// 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;
}