1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 03:03:43 +00:00

Remove empty catch blocks, and update tslint rule (#513)

This commit is contained in:
Oscar Hinton
2021-10-19 10:32:14 +02:00
committed by GitHub
parent 62011628d0
commit f09fb69882
38 changed files with 228 additions and 85 deletions

View File

@@ -10,13 +10,15 @@ import { EventService as EventServiceAbstraction } from '../abstractions/event.s
import { StorageService } from '../abstractions/storage.service';
import { UserService } from '../abstractions/user.service';
import { LogService } from '../abstractions/log.service';
import { ConstantsService } from './constants.service';
export class EventService implements EventServiceAbstraction {
private inited = false;
constructor(private storageService: StorageService, private apiService: ApiService,
private userService: UserService, private cipherService: CipherService) { }
private userService: UserService, private cipherService: CipherService,
private logService: LogService) { }
init(checkOnInterval: boolean) {
if (this.inited) {
@@ -83,7 +85,9 @@ export class EventService implements EventServiceAbstraction {
try {
await this.apiService.postEventsCollect(request);
this.clearEvents();
} catch { }
} catch (e) {
this.logService.error(e);
}
}
async clearEvents(): Promise<any> {