hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32071] New: - URIException should allow capture of "root cause" exception
Date Thu, 04 Nov 2004 23:48:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32071>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32071

URIException should allow capture of "root cause" exception

           Summary: URIException should allow capture of "root cause"
                    exception
           Product: HttpClient
           Version: 2.0.2
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Commons HttpClient
        AssignedTo: httpclient-dev@jakarta.apache.org
        ReportedBy: pmonks@sydneyclimbing.com


The URIException class (and its subclasses) should provide a way to capture the
"root cause" exception, if one exists.  For consistency, it would be ideal if
this facility was the same as the mechanism implemented in the JDK 1.4 Throwable
class.

The example I'm battling with at the moment is socket timeouts.  If I set a
timeout (eg. via HttpClient.setTimeout()) and that timeout is exceeded in an
HTTP request, a java.net.SocketTimeoutException is thrown.  However this gets
wrapped in an org.apache.commons.httpclient.HttpRecoverableException by the
library, and the only way for my application code to find out that the
underlying cause was a SocketTimeoutException is to inspect the message of the
HttpRecoverableException.  Given that the message is just a String, this isn't a
very robust way of determining the root cause of the HttpRecoverableException.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message