manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mol...@apache.org
Subject svn commit: r1633284 - /manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
Date Tue, 21 Oct 2014 06:55:25 GMT
Author: molgun
Date: Tue Oct 21 06:55:25 2014
New Revision: 1633284

URL: http://svn.apache.org/r1633284
Log:
CONNECTORS-1077: Using actual exception names

Modified:
    manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java

Modified: manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java?rev=1633284&r1=1633283&r2=1633284&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
(original)
+++ manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
Tue Oct 21 06:55:25 2014
@@ -914,9 +914,9 @@ public class HttpPoster
               (activityDetails.toLowerCase(Locale.ROOT).indexOf("broken pipe") != -1 ||
                 activityDetails.toLowerCase(Locale.ROOT).indexOf("connection reset") != -1
||
                 activityDetails.toLowerCase(Locale.ROOT).indexOf("target server failed to
respond") != -1))
-              activityCode = "SOLR REJECT";
+              activityCode = "SOLRREJECT";
             else
-              activityCode = "FAILED";
+              activityCode = e.getClass().getSimpleName().toUpperCase(Locale.ROOT);
 
             // Rethrow; will interpret at a higher level
             throw e;
@@ -940,7 +940,7 @@ public class HttpPoster
             return;
           
           activityStart = new Long(fullStartTime);
-          activityCode = "IO ERROR";
+          activityCode = ioe.getClass().getSimpleName().toUpperCase(Locale.ROOT);
           activityDetails = ioe.getMessage();
 
           // Log the error
@@ -1269,7 +1269,7 @@ public class HttpPoster
         catch (SolrServerException e)
         {
           activityStart = new Long(fullStartTime);
-          activityCode = "FAILED";
+          activityCode = e.getClass().getSimpleName().toUpperCase(Locale.ROOT);
           activityDetails = e.getMessage() +
             ((e.getCause() != null)?": "+e.getCause().getMessage():"");
 
@@ -1278,7 +1278,7 @@ public class HttpPoster
         catch (SolrException e)
         {
           activityStart = new Long(fullStartTime);
-          activityCode = "FAILED";
+          activityCode = e.getClass().getSimpleName().toUpperCase(Locale.ROOT);
           activityDetails = e.getMessage() +
             ((e.getCause() != null)?": "+e.getCause().getMessage():"");
 
@@ -1290,7 +1290,7 @@ public class HttpPoster
           Logging.ingest.warn("Error deleting document: "+ioe.getMessage(),ioe);
 
           activityStart = new Long(fullStartTime);
-          activityCode = "IO ERROR";
+          activityCode = ioe.getClass().getSimpleName().toUpperCase(Locale.ROOT);
           activityDetails = ioe.getMessage();
 
           throw ioe;



Mime
View raw message