mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-23 22:26:01 +00:00
[HER-1710] on problem loading persist log, close reader
This commit is contained in:
@@ -202,10 +202,17 @@ public abstract class PersistProcessor extends Processor {
|
||||
logger.fine(splits[0] + " " + ArchiveUtils.prettyString(alist));
|
||||
}
|
||||
|
||||
if (historyMap != null) {
|
||||
// XXX allow RuntimeExceptions to propagate
|
||||
if (historyMap != null) try {
|
||||
historyMap.put(splits[0], alist);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "caught exception after loading " + count +
|
||||
" urls from the persist log (perhaps crawl was stopped by user?)", e);
|
||||
IOUtils.closeQuietly(persistLogReader);
|
||||
|
||||
// seems to finish most cleanly when we return rather than throw something
|
||||
return count;
|
||||
}
|
||||
|
||||
count++;
|
||||
}
|
||||
IOUtils.closeQuietly(persistLogReader);
|
||||
|
||||
Reference in New Issue
Block a user