fix #486 : ignore error
This commit is contained in:
parent
fad0455e75
commit
03cbf858ef
2 changed files with 6 additions and 8 deletions
|
@ -266,12 +266,11 @@ public class CsvDataStoreImpl extends AbstractDataStoreImpl {
|
|||
}
|
||||
final FailureUrlService failureUrlService = ComponentUtil.getComponent(FailureUrlService.class);
|
||||
failureUrlService.store(dataConfig, errorName, url, target);
|
||||
} catch (final Exception | OutOfMemoryError e) {
|
||||
} catch (final Throwable t) {
|
||||
logger.warn("Crawling Access Exception at : " + dataMap, t);
|
||||
final String url = csvFile.getAbsolutePath() + ":" + csvReader.getLineNumber();
|
||||
final FailureUrlService failureUrlService = ComponentUtil.getComponent(FailureUrlService.class);
|
||||
failureUrlService.store(dataConfig, e.getClass().getCanonicalName(), url, e);
|
||||
|
||||
logger.warn("Crawling Access Exception at : " + dataMap, e);
|
||||
failureUrlService.store(dataConfig, t.getClass().getCanonicalName(), url, t);
|
||||
}
|
||||
|
||||
if (readInterval > 0) {
|
||||
|
|
|
@ -210,12 +210,11 @@ public class EsDataStoreImpl extends AbstractDataStoreImpl {
|
|||
}
|
||||
final FailureUrlService failureUrlService = ComponentUtil.getComponent(FailureUrlService.class);
|
||||
failureUrlService.store(dataConfig, errorName, url, target);
|
||||
} catch (final Exception e) {
|
||||
} catch (final Throwable t) {
|
||||
logger.warn("Crawling Access Exception at : " + dataMap, t);
|
||||
final String url = hit.getIndex() + "/" + hit.getType() + "/" + hit.getId();
|
||||
final FailureUrlService failureUrlService = ComponentUtil.getComponent(FailureUrlService.class);
|
||||
failureUrlService.store(dataConfig, e.getClass().getCanonicalName(), url, e);
|
||||
|
||||
logger.warn("Crawling Access Exception at : " + dataMap, e);
|
||||
failureUrlService.store(dataConfig, t.getClass().getCanonicalName(), url, t);
|
||||
}
|
||||
|
||||
if (bulkRequest != null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue