Fail gracefully if we can't open the new query file

This commit is contained in:
Elena Tanasoiu
2023-04-11 09:37:13 +00:00
parent 061f347ea0
commit 30011aaf65

View File

@@ -80,9 +80,15 @@ export class SkeletonQueryWizard {
join(this.storagePath, this.folderName, this.fileName),
);
void workspace.openTextDocument(queryFileUri).then((doc) => {
void Window.showTextDocument(doc);
});
try {
void workspace.openTextDocument(queryFileUri).then((doc) => {
void Window.showTextDocument(doc);
});
} catch (e: unknown) {
void this.extLogger.log(
`Could not open example query file: ${getErrorMessage(e)}`,
);
}
}
private workoutStoragePath() {