Fix some unhandled promise lint errors (#16924)

This commit is contained in:
Charles Gagnon
2021-08-30 09:08:28 -07:00
committed by GitHub
parent fde114bb14
commit 7804c87c87
14 changed files with 48 additions and 48 deletions

View File

@@ -112,7 +112,7 @@ export class BookTocManager implements IBookTocManager {
}
}
catch (error) {
vscode.window.showWarningMessage(loc.msgCreateBookWarningMsg(content));
void vscode.window.showWarningMessage(loc.msgCreateBookWarningMsg(content));
}
}
return toc;
@@ -132,7 +132,7 @@ export class BookTocManager implements IBookTocManager {
}
this.movedFiles.set(src, path.join(newFileName.concat(' - ', counter.toString())).concat(path.parse(dest).ext));
await fs.move(src, path.join(newFileName.concat(' - ', counter.toString())).concat(path.parse(dest).ext), { overwrite: true });
vscode.window.showInformationMessage(loc.duplicateFileError(path.parse(dest).base, src, newFileName.concat(' - ', counter.toString())));
void vscode.window.showInformationMessage(loc.duplicateFileError(path.parse(dest).base, src, newFileName.concat(' - ', counter.toString())));
return newFileName.concat(' - ', counter.toString());
}
@@ -424,7 +424,7 @@ export class BookTocManager implements IBookTocManager {
}
} catch (e) {
await this.recovery();
vscode.window.showErrorMessage(loc.editBookError(element.book.contentPath, e instanceof Error ? e.message : e));
void vscode.window.showErrorMessage(loc.editBookError(element.book.contentPath, e instanceof Error ? e.message : e));
} finally {
try {
await this._targetBook.reinitializeContents();