From 1aebea52e1acf63e6fb0bda6cfa1f2c5bb00badb Mon Sep 17 00:00:00 2001 From: Dzmitry Shylovich Date: Sat, 11 Mar 2017 01:44:14 +0300 Subject: [PATCH] fix(core): ErrorHandler should not rethrow an error by default (#13534) Closes #14949 Closes #13159 Closes #8993 --- packages/core/src/error_handler.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/core/src/error_handler.ts b/packages/core/src/error_handler.ts index 35c00641250a9..e3263b6a6d819 100644 --- a/packages/core/src/error_handler.ts +++ b/packages/core/src/error_handler.ts @@ -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; }