You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by ml...@apache.org on 2013/06/26 09:39:08 UTC

svn commit: r1496804 - /manifoldcf/branches/CONNECTORS-727/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java

Author: mlizewski
Date: Wed Jun 26 07:39:08 2013
New Revision: 1496804

URL: http://svn.apache.org/r1496804
Log:
improved error reporting on wrong http return code

Modified:
    manifoldcf/branches/CONNECTORS-727/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java

Modified: manifoldcf/branches/CONNECTORS-727/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-727/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java?rev=1496804&r1=1496803&r2=1496804&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-727/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-727/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java Wed Jun 26 07:39:08 2013
@@ -17,9 +17,6 @@
  */
 package org.apache.manifoldcf.crawler.connectors.generic;
 
-import org.apache.manifoldcf.crawler.connectors.generic.api.Meta;
-import org.apache.manifoldcf.crawler.connectors.generic.api.Item;
-import org.apache.manifoldcf.crawler.connectors.generic.api.Items;
 import java.io.*;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -30,13 +27,6 @@ import java.util.concurrent.ConcurrentHa
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
@@ -61,6 +51,9 @@ import org.apache.manifoldcf.core.common
 import org.apache.manifoldcf.core.interfaces.*;
 import org.apache.manifoldcf.core.system.ManifoldCF;
 import org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector;
+import org.apache.manifoldcf.crawler.connectors.generic.api.Item;
+import org.apache.manifoldcf.crawler.connectors.generic.api.Items;
+import org.apache.manifoldcf.crawler.connectors.generic.api.Meta;
 import org.apache.manifoldcf.crawler.interfaces.*;
 import org.apache.manifoldcf.ui.util.Encoder;
 import org.xml.sax.Attributes;
@@ -1122,7 +1115,7 @@ public class GenericConnector extends Ba
         HttpResponse response = client.execute(method);
         try {
           if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
-            exception = new ManifoldCFException("addSeedDocuments error - interface returned incorrect return code");
+            exception = new ManifoldCFException("addSeedDocuments error - interface returned incorrect return code for: " + url + " - " + response.getStatusLine().toString());
             return;
           }
 
@@ -1195,7 +1188,7 @@ public class GenericConnector extends Ba
         HttpResponse response = client.execute(method);
         try {
           if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
-            exception = new ManifoldCFException("addSeedDocuments error - interface returned incorrect return code");
+            exception = new ManifoldCFException("addSeedDocuments error - interface returned incorrect return code for: " + url + " - " + response.getStatusLine().toString());
             return;
           }
           JAXBContext context;
@@ -1265,7 +1258,7 @@ public class GenericConnector extends Ba
         HttpResponse response = client.execute(method);
         try {
           if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
-            exception = new ManifoldCFException("processDocuments error - interface returned incorrect return code for: " + url);
+            exception = new ManifoldCFException("processDocuments error - interface returned incorrect return code for: " + url + " - " + response.getStatusLine().toString());
             return;
           }
           synchronized (this) {