Skip to content

Commit

Permalink
improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Sep 26, 2024
1 parent 9c73374 commit 7230dc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/renderer/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1449,11 +1449,11 @@ function App() {
const batchOpenSingleFile = useCallback(async (path: string) => {
if (workingRef.current) return;
if (filePath === path) return;
setWorking({ text: i18n.t('Loading file') });
try {
setWorking({ text: i18n.t('Loading file') });
await userOpenSingleFile({ path });
} catch (err) {
handleError(err);
await withErrorHandling(async () => {
await userOpenSingleFile({ path });
}, i18n.t('Failed to open file'));
} finally {
setWorking(undefined);
}
Expand Down

0 comments on commit 7230dc5

Please sign in to comment.