Author: kwright
Date: Sun Apr 28 18:08:05 2013
New Revision: 1476810
URL: http://svn.apache.org/r1476810
Log:
Close all read operations even if there are exceptions on some of the bins.
Modified:
manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
Modified:
manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java?rev=1476810&r1=1476809&r2=1476810&view=diff
==============================================================================
---
manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
(original)
+++
manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
Sun Apr 28 18:08:05 2013
@@ -1213,9 +1213,26 @@ public class ThrottledFetcher
public void endRead(int origLen, int actualAmt)
{
// Consult with throttle bins
+ Throwable e = null;
for (int i = 0; i < throttleBinArray.length; i++)
{
- throttleBinArray[i].endRead(origLen,actualAmt);
+ try
+ {
+ throttleBinArray[i].endRead(origLen,actualAmt);
+ }
+ catch (Throwable e2)
+ {
+ e = e2;
+ }
+ }
+ if (e != null)
+ {
+ if (e instanceof RuntimeException)
+ throw (RuntimeException)e;
+ else if (e instanceof Error)
+ throw (Error)e;
+ else
+ throw new RuntimeException("Unknown exception: " + e.getMessage(),e);
}
}