fix(core): ErrorHandler should not rethrow an error by default (#15077)
This commit is contained in:
parent
df914ef4bf
commit
6559425b07
|
@ -46,7 +46,7 @@ export class ErrorHandler {
|
||||||
*/
|
*/
|
||||||
rethrowError: boolean;
|
rethrowError: boolean;
|
||||||
|
|
||||||
constructor(rethrowError: boolean = true) { this.rethrowError = rethrowError; }
|
constructor(rethrowError: boolean = false) { this.rethrowError = rethrowError; }
|
||||||
|
|
||||||
handleError(error: any): void {
|
handleError(error: any): void {
|
||||||
this._console.error(`EXCEPTION: ${this._extractMessage(error)}`);
|
this._console.error(`EXCEPTION: ${this._extractMessage(error)}`);
|
||||||
|
@ -71,8 +71,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;
|
if (this.rethrowError) throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue