1
0
mirror of https://github.com/bitwarden/web synced 2026-01-06 10:33:17 +00:00

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

This commit is contained in:
Oscar Hinton
2021-10-20 18:30:04 +02:00
committed by GitHub
parent 4447b89b05
commit 044ac513ae
90 changed files with 516 additions and 222 deletions

View File

@@ -11,6 +11,7 @@ import { ToasterService } from 'angular2-toaster';
import { CipherService } from 'jslib-common/abstractions/cipher.service';
import { EventService } from 'jslib-common/abstractions/event.service';
import { I18nService } from 'jslib-common/abstractions/i18n.service';
import { LogService } from 'jslib-common/abstractions/log.service';
import { PasswordRepromptService } from 'jslib-common/abstractions/passwordReprompt.service';
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
import { SearchService } from 'jslib-common/abstractions/search.service';
@@ -52,7 +53,7 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
protected i18nService: I18nService, protected platformUtilsService: PlatformUtilsService,
protected cipherService: CipherService, protected eventService: EventService,
protected totpService: TotpService, protected userService: UserService,
protected passwordRepromptService: PasswordRepromptService) {
protected passwordRepromptService: PasswordRepromptService, private logService: LogService) {
super(searchService);
}
@@ -158,7 +159,9 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
this.toasterService.popAsync('success', null, this.i18nService.t(permanent ? 'permanentlyDeletedItem'
: 'deletedItem'));
this.refresh();
} catch { }
} catch (e) {
this.logService.error(e);
}
this.actionPromise = null;
}
@@ -179,7 +182,9 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
await this.actionPromise;
this.toasterService.popAsync('success', null, this.i18nService.t('restoredItem'));
this.refresh();
} catch { }
} catch (e) {
this.logService.error(e);
}
this.actionPromise = null;
}