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();


Reply via email to