fix #486 : ignore error
This commit is contained in:
parent
ed64be6ef0
commit
3517522093
3 changed files with 9 additions and 12 deletions
|
@ -268,12 +268,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) {
|
||||
|
|
|
@ -148,12 +148,11 @@ public class DatabaseDataStoreImpl extends AbstractDataStoreImpl {
|
|||
}
|
||||
final FailureUrlService failureUrlService = ComponentUtil.getComponent(FailureUrlService.class);
|
||||
failureUrlService.store(config, errorName, url, target);
|
||||
} catch (final Exception | OutOfMemoryError e) {
|
||||
} catch (final Throwable t) {
|
||||
logger.warn("Crawling Access Exception at : " + dataMap, t);
|
||||
final String url = sql + ":" + rs.getRow();
|
||||
final FailureUrlService failureUrlService = ComponentUtil.getComponent(FailureUrlService.class);
|
||||
failureUrlService.store(config, e.getClass().getCanonicalName(), url, e);
|
||||
|
||||
logger.warn("Crawling Access Exception at : " + dataMap, e);
|
||||
failureUrlService.store(config, t.getClass().getCanonicalName(), url, t);
|
||||
}
|
||||
|
||||
if (readInterval > 0) {
|
||||
|
|
|
@ -214,12 +214,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