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:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user