Skip to content

Commit

Permalink
If project migration check fails display an error message
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismaltby committed Sep 19, 2024
1 parent 49de1d9 commit b67d91b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,16 @@ ipcMain.handle(
);

ipcMain.handle("dialog:migrate-warning", async (_event, path: string) => {
return migrateWarning(path);
try {
return await migrateWarning(path);
} catch (e) {
if (e instanceof Error) {
dialog.showErrorBox(l10n("ERROR_INVALID_FILE_TYPE"), e.stack ?? "");
} else {
dialog.showErrorBox(l10n("ERROR_INVALID_FILE_TYPE"), String(e));
}
return false;
}
});

ipcMain.handle("close-project", () => {
Expand Down

0 comments on commit b67d91b

Please sign in to comment.