Author: kwright
Date: Tue Dec 23 10:07:06 2014
New Revision: 1647528
URL: http://svn.apache.org/r1647528
Log:
Handle exceptions differently
Modified:
manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java
manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobResetThread.java
Modified:
manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java?rev=1647528&r1=1647527&r2=1647528&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java
(original)
+++
manifoldcf/branches/CONNECTORS-1119/connectors/email/connector/src/main/java/org/apache/manifoldcf/crawler/notifications/email/EmailConnector.java
Tue Dec 23 10:07:06 2014
@@ -649,29 +649,9 @@ public class EmailConnector extends org.
throws ManifoldCFException, ServiceInterruption
{
Logging.connectors.error("Email: Error "+context+": "+e.getMessage(),e);
- throw new ManifoldCFException("Error "+context+": "+e.getMessage(),e);
+ throw new ServiceInterruption("Error "+context+":
"+e.getMessage(),e,-1,-1,-1,true);
}
- /** Handle IO Exception */
- protected static void handleIOException(IOException e, String context)
- throws ManifoldCFException, ServiceInterruption
- {
- if (e instanceof java.net.SocketTimeoutException)
- {
- Logging.connectors.error("Email: Socket timeout "+context+":
"+e.getMessage(),e);
- throw new ManifoldCFException("Socket timeout: "+e.getMessage(),e);
- }
- else if (e instanceof InterruptedIOException)
- {
- throw new ManifoldCFException("Interrupted:
"+e.getMessage(),ManifoldCFException.INTERRUPTED);
- }
- else
- {
- Logging.connectors.error("Email: IO error "+context+":
"+e.getMessage(),e);
- throw new ManifoldCFException("IO error "+context+": "+e.getMessage(),e);
- }
- }
-
/** Class to set up connection.
*/
protected static class ConnectThread extends Thread
Modified:
manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobResetThread.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobResetThread.java?rev=1647528&r1=1647527&r2=1647528&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobResetThread.java
(original)
+++
manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobResetThread.java
Tue Dec 23 10:07:06 2014
@@ -204,7 +204,7 @@ public class JobResetThread extends Thre
}
catch (ServiceInterruption e)
{
- Logging.connectors.warn("Can't notify: "+e.getMessage(),e);
+ Logging.connectors.warn("Can't notify right now: "+e.getMessage(),e);
}
}
}