maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r1034810 - /maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
Date Sat, 13 Nov 2010 17:16:21 GMT
Author: dennisl
Date: Sat Nov 13 17:16:20 2010
New Revision: 1034810

URL: http://svn.apache.org/viewvc?rev=1034810&view=rev
Log:
o Improve error message when downloading resources from URLs.

Modified:
    maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java

Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java?rev=1034810&r1=1034809&r2=1034810&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
Sat Nov 13 17:16:20 2010
@@ -807,7 +807,9 @@ public abstract class AbstractXmlParser
                 int statusCode = response.getStatusLine().getStatusCode();
                 if ( statusCode != HttpStatus.SC_OK )
                 {
-                    throw new IOException( "Method failed: " + response.getStatusLine().getReasonPhrase()
);
+                    throw new IOException( "The status code when accessing the URL '" + url.toString()
+ "' was "
+                        + statusCode + ", which is not allowed. The server gave this reason
for the failure '"
+                        + response.getStatusLine().getReasonPhrase() + "'.");
                 }
 
                 entity = response.getEntity();



Mime
View raw message