From 11fef7312a4ba3a69b1a0e0cb43a055cf096f3bf Mon Sep 17 00:00:00 2001 From: Chuck Jazdzewski Date: Fri, 10 Mar 2017 15:05:48 -0800 Subject: [PATCH] Revert "fix(core): ErrorHandler should not rethrow an error by default (#13534)" This reverts commit 1aebea52e1acf63e6fb0bda6cfa1f2c5bb00badb. --- packages/core/src/error_handler.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/core/src/error_handler.ts b/packages/core/src/error_handler.ts index e3263b6a6d819..35c00641250a9 100644 --- a/packages/core/src/error_handler.ts +++ b/packages/core/src/error_handler.ts @@ -41,7 +41,12 @@ export class ErrorHandler { */ _console: Console = console; - constructor(private rethrowError: boolean = false) {} + /** + * @internal + */ + rethrowError: boolean; + + constructor(rethrowError: boolean = true) { this.rethrowError = rethrowError; } handleError(error: any): void { this._console.error(`EXCEPTION: ${this._extractMessage(error)}`); @@ -66,6 +71,8 @@ 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; }