[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14294255#comment-14294255
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1603:
-----------------------------------------------

Believe it or not, it was done for convenience of people migrating off HC 2.x 
and HC 3.x, which basically made no distinction between transport and protocol 
errors, where everything was a frigging mess and all exceptions were based on 
IOException. Please also bear in mind that _a lot_ of HttpClient design 
decisions were made while Java 1.3 was a novelty and Bruce Willis still had 
scalp hair.

Oleg


> ClientProtocolException contradicts tutorial statement in chapter 1.4
> ---------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1603
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1603
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Documentation, HttpClient
>    Affects Versions: 4.3.6, 4.4 Beta1
>            Reporter: Michael Osipov
>            Priority: Minor
>             Fix For: 4.4 Final
>
>
> [Chapter 
> 1.4|http://hc.apache.org/httpcomponents-client-ga/tutorial/html/fundamentals.html#d5e271]
>  says: "HttpClient can throw two types of exceptions: {{java.io.IOException}} 
> in case of an I/O failure such as socket timeout or an socket reset and 
> {{HttpException}} that signals an HTTP failure such as a violation of the 
> HTTP protocol. Usually I/O errors are considered non-fatal and recoverable, 
> whereas HTTP protocol errors are considered fatal and cannot be automatically 
> recovered from."
> The 
> [Javadoc|http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/ClientProtocolException.html]
>  of {{ClientProtocolException}} says: "Signals an error in the HTTP 
> protocol." Given the definition established in the tutorial, either one is 
> incorrect. Either {{ClientProtocolException}} must derive from 
> {{HttpException}} or its documentation must be contrary to the latter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to