Revert "fix(core): ErrorHandler should not rethrow an error by default (#15077)"
This reverts commit 6559425b07
.
This commit is contained in:
parent
6772c913c7
commit
313158132d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue