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

View File

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