Fix issue where errors during project update were swallowed (#22612)

* adding errors

* Fixing bug where errors occurring during updating project got swallowed

* removing unnecessary "vscode"
This commit is contained in:
Benjin Dubishar
2023-04-04 13:19:07 -07:00
committed by GitHub
parent 958a3f85e5
commit cec349d2a4
2 changed files with 20 additions and 9 deletions

View File

@@ -184,11 +184,17 @@ export class Project implements ISqlProject {
}
} else {
// use "void" with a .then() to not block the UI thread while prompting the user
void window.showErrorMessage(constants.updateProjectForCrossPlatform(project.projectFileName), constants.yesString, constants.noString).then(async (result) => {
if (result === constants.yesString) {
await project.updateProjectForCrossPlatform();
void window.showErrorMessage(constants.updateProjectForCrossPlatform(project.projectFileName), constants.yesString, constants.noString).then(
async (result) => {
if (result === constants.yesString) {
try {
await project.updateProjectForCrossPlatform();
} catch (error) {
void window.showErrorMessage(utils.getErrorMessage(utils.getErrorMessage(error)));
}
}
}
});
);
}
return project.isCrossPlatformCompatible;