Skip to content

Commit

Permalink
fix(core): ErrorHandler should not rethrow an error by default (angul…
Browse files Browse the repository at this point in the history
  • Loading branch information
DzmitryShylovich authored and juleskremer committed Aug 24, 2017
1 parent 8cd514d commit 04edd1a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/core/src/error_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`);
Expand All @@ -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;
}

Expand Down

0 comments on commit 04edd1a

Please sign in to comment.