manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1431399 - /manifoldcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
Date Thu, 10 Jan 2013 15:04:09 GMT
Author: kwright
Date: Thu Jan 10 15:04:09 2013
New Revision: 1431399

URL: http://svn.apache.org/viewvc?rev=1431399&view=rev
Log:
Add better activity logging for failure situations, since Solr does not concatenate the second
level of exception itself.

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=1431399&r1=1431398&r2=1431399&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
Thu Jan 10 15:04:09 2013
@@ -756,7 +756,8 @@ public class HttpPoster
             activityStart = new Long(fullStartTime);
             activityBytes = new Long(length);
             activityCode = "FAILED";
-            activityDetails = e.getMessage();
+            activityDetails = e.getMessage() +
+              ((e.getCause() != null)?": "+e.getCause().getMessage():"");
             
             // Rethrow; will interpret at a higher level
             throw e;
@@ -767,7 +768,8 @@ public class HttpPoster
             activityStart = new Long(fullStartTime);
             activityBytes = new Long(length);
             activityCode = Integer.toString(e.code());
-            activityDetails = e.getMessage();
+            activityDetails = e.getMessage() +
+              ((e.getCause() != null)?": "+e.getCause().getMessage():"");
             
             // Rethrow; we'll interpret at the next level
             throw e;
@@ -877,7 +879,8 @@ public class HttpPoster
         {
           activityStart = new Long(fullStartTime);
           activityCode = "FAILED";
-          activityDetails = e.getMessage();
+          activityDetails = e.getMessage() +
+            ((e.getCause() != null)?": "+e.getCause().getMessage():"");
 
           throw e;
         }
@@ -885,7 +888,8 @@ public class HttpPoster
         {
           activityStart = new Long(fullStartTime);
           activityCode = "FAILED";
-          activityDetails = e.getMessage();
+          activityDetails = e.getMessage() +
+            ((e.getCause() != null)?": "+e.getCause().getMessage():"");
 
           throw e;
         }



Mime
View raw message