Catch all Tesseract related errors

This commit is contained in:
jendib 2015-08-29 01:20:06 +02:00
parent 6558ff7e05
commit 9c97ab14f8

View File

@ -88,7 +88,7 @@ public class FileUtil {
log.info("Starting OCR with TESSDATA_PREFIX=" + System.getenv("TESSDATA_PREFIX") + ";LC_NUMERIC=" + System.getenv("LC_NUMERIC")); log.info("Starting OCR with TESSDATA_PREFIX=" + System.getenv("TESSDATA_PREFIX") + ";LC_NUMERIC=" + System.getenv("LC_NUMERIC"));
instance.setLanguage(document.getLanguage()); instance.setLanguage(document.getLanguage());
content = instance.doOCR(image); content = instance.doOCR(image);
} catch (Exception e) { } catch (Throwable e) {
log.error("Error while OCR-izing the image", e); log.error("Error while OCR-izing the image", e);
} }