Skip to content

Commit

Permalink
Merge pull request #68 from nlevitt/handle-apply-overlay-exc
Browse files Browse the repository at this point in the history
handle exception determining whether to apply overlay
  • Loading branch information
Roger G. Coram committed May 28, 2014
2 parents 12186af + 963e04e commit fc43a29
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.logging.Level;
import java.util.logging.Logger;

import org.archive.modules.CrawlURI;
Expand Down Expand Up @@ -326,8 +327,12 @@ public void applyOverlaysTo(CrawlURI curi) {
}
// apply deciderule-based overlays
for(DecideRuledSheetAssociation assoc : ruleAssociations) {
if(assoc.getRules().accepts(curi)) {
curi.getOverlayNames().addAll(assoc.getTargetSheetNames());
try {
if(assoc.getRules().accepts(curi)) {
curi.getOverlayNames().addAll(assoc.getTargetSheetNames());
}
} catch (Exception e) {
logger.log(Level.SEVERE, "problem determining whether to apply overlays, so not applying " + assoc.getTargetSheetNames() + " to " + curi, e);
}
}
// even if no overlays set, let creation of empty list signal
Expand Down

0 comments on commit fc43a29

Please sign in to comment.