1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +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 { ApiService } from 'jslib-common/abstractions/api.service';
import { CollectionService } from 'jslib-common/abstractions/collection.service';
import { I18nService } from 'jslib-common/abstractions/i18n.service';
import { LogService } from 'jslib-common/abstractions/log.service';
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
import { CollectionData } from 'jslib-common/models/data/collectionData';
@@ -85,7 +86,7 @@ export class UserAddEditComponent implements OnInit {
constructor(private apiService: ApiService, private i18nService: I18nService,
private toasterService: ToasterService, private collectionService: CollectionService,
private platformUtilsService: PlatformUtilsService) { }
private platformUtilsService: PlatformUtilsService, private logService: LogService) { }
async ngOnInit() {
this.editMode = this.loading = this.organizationUserId != null;
@@ -111,7 +112,9 @@ export class UserAddEditComponent implements OnInit {
}
});
}
} catch { }
} catch (e) {
this.logService.error(e);
}
} else {
this.title = this.i18nService.t('inviteUser');
}
@@ -180,7 +183,9 @@ export class UserAddEditComponent implements OnInit {
this.toasterService.popAsync('success', null,
this.i18nService.t(this.editMode ? 'editedUserId' : 'invitedUsers', this.name));
this.onSavedUser.emit();
} catch { }
} catch (e) {
this.logService.error(e);
}
}
async delete() {
@@ -200,6 +205,8 @@ export class UserAddEditComponent implements OnInit {
await this.deletePromise;
this.toasterService.popAsync('success', null, this.i18nService.t('removedUserId', this.name));
this.onDeletedUser.emit();
} catch { }
} catch (e) {
this.logService.error(e);
}
}
}