kopia lustrzana https://github.com/mifi/lossless-cut
improve error handling
rodzic
9c733742a2
commit
7230dc549b
|
@ -1449,11 +1449,11 @@ function App() {
|
||||||
const batchOpenSingleFile = useCallback(async (path: string) => {
|
const batchOpenSingleFile = useCallback(async (path: string) => {
|
||||||
if (workingRef.current) return;
|
if (workingRef.current) return;
|
||||||
if (filePath === path) return;
|
if (filePath === path) return;
|
||||||
try {
|
|
||||||
setWorking({ text: i18n.t('Loading file') });
|
setWorking({ text: i18n.t('Loading file') });
|
||||||
|
try {
|
||||||
|
await withErrorHandling(async () => {
|
||||||
await userOpenSingleFile({ path });
|
await userOpenSingleFile({ path });
|
||||||
} catch (err) {
|
}, i18n.t('Failed to open file'));
|
||||||
handleError(err);
|
|
||||||
} finally {
|
} finally {
|
||||||
setWorking(undefined);
|
setWorking(undefined);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue