Add no-floating-promises for mssql extension (#16956)

This commit is contained in:
Charles Gagnon
2021-09-02 09:22:25 -07:00
committed by GitHub
parent f35576ae7f
commit 9516472f1b
22 changed files with 92 additions and 79 deletions

View File

@@ -34,7 +34,7 @@ export class HdfsModel {
public fileStatus: FileStatus;
constructor(private readonly fileSource: IFileSource, private readonly path: string) {
this.refresh();
this.refresh().catch(err => console.error('Error refreshing HDFS Model ', err));
}
/**
@@ -117,7 +117,7 @@ export class HdfsModel {
);
} catch (error) {
const errMsg = localize('mssql.recursivePermissionOpError', "Error applying permission changes: {0}", (error instanceof Error ? error.message : error));
vscode.window.showErrorMessage(errMsg);
void vscode.window.showErrorMessage(errMsg);
op.updateStatus(azdata.TaskStatus.Failed, errMsg);
}
}

View File

@@ -67,7 +67,7 @@ export class ManageAccessDialog {
azdata.window.closeDialog(this.dialog);
await this.hdfsModel.apply(true);
} catch (err) {
vscode.window.showErrorMessage(loc.errorApplyingAclChanges(err instanceof HdfsError ? err.message : err));
void vscode.window.showErrorMessage(loc.errorApplyingAclChanges(err instanceof HdfsError ? err.message : err));
}
});
this.dialog.customButtons = [this.applyRecursivelyButton];
@@ -76,7 +76,7 @@ export class ManageAccessDialog {
await this.hdfsModel.apply();
return true;
} catch (err) {
vscode.window.showErrorMessage(loc.errorApplyingAclChanges(err instanceof HdfsError ? err.message : err));
void vscode.window.showErrorMessage(loc.errorApplyingAclChanges(err instanceof HdfsError ? err.message : err));
}
return false;
});
@@ -331,7 +331,7 @@ export class ManageAccessDialog {
this.rootLoadingComponent.loading = false;
this.addUserOrGroupInput.focus();
void this.addUserOrGroupInput.focus();
});
}