mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
Add Custom ErrorHandler (#8543)
This commit is contained in:
14
libs/angular/src/platform/services/logging-error-handler.ts
Normal file
14
libs/angular/src/platform/services/logging-error-handler.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ErrorHandler, Injectable } from "@angular/core";
|
||||
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
|
||||
@Injectable()
|
||||
export class LoggingErrorHandler extends ErrorHandler {
|
||||
constructor(private readonly logService: LogService) {
|
||||
super();
|
||||
}
|
||||
|
||||
override handleError(error: any): void {
|
||||
this.logService.error(error);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user