新增try catch orc异常

segment2.0
linrf 2 years ago
parent d5a7d6da61
commit ff376539e9

@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -32,6 +33,7 @@ public class OcrServiceImpl implements OcrApi {
@Override
public List<String> getText(String path) {
try {
StopWatch watch = new StopWatch();
@ -63,6 +65,11 @@ public class OcrServiceImpl implements OcrApi {
}
return texts;
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
return Collections.emptyList();
}
}
@Override

Loading…
Cancel
Save