fix(core): ErrorHandler should not rethrow an error by default (#13534)
Closes #14949 Closes #13159 Closes #8993
This commit is contained in:
parent
920b3d259d
commit
1aebea52e1
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue