From 313158132d57493cf0ca05a64fc1d974cd2e3e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=A1ko=20Hevery?= Date: Wed, 15 Mar 2017 13:56:24 -0700 Subject: [PATCH] Revert "fix(core): ErrorHandler should not rethrow an error by default (#15077)" This reverts commit 6559425b07293f912577b3d7d9929bf0b48fac96. --- packages/core/src/error_handler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/error_handler.ts b/packages/core/src/error_handler.ts index 41d7d02ea3..e4438ef315 100644 --- a/packages/core/src/error_handler.ts +++ b/packages/core/src/error_handler.ts @@ -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; }