1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-02 12:47:41 +02:00

Chore: Fixed OCR error handling

This commit is contained in:
Laurent Cozic 2023-12-30 19:20:50 +00:00
parent 37dbea1613
commit 105e408dca

View File

@ -119,7 +119,8 @@ export default class OcrDriverTesseract extends OcrDriverBase {
hocr: false,
tsv: false,
});
} catch (error) {
} catch (e) {
const error: Error = typeof e === 'string' ? new Error(e) : e;
error.message = `Recognition failed on: ${filePath}: ${error.message}`;
if (!hasTimedOut) reject(error);
return;