[
https://issues.apache.org/jira/browse/HTTPCLIENT-1586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14235327#comment-14235327
]
Gerhard Poul commented on HTTPCLIENT-1586:
------------------------------------------
[~olegk] I think I am, but there are also existing code-bases that might
benefit from this
What I used to reproduce this was:
{code:java}
public class GPTest {
@Test
public void testConnRefusedErrorMessage() throws Exception {
final HttpClient httpclient = HttpClientBuilder.create().build();
final HttpGet httpget = new HttpGet("http://localhost:777/fdsjakfdjsa");
final CloseableHttpResponse response = httpclient.execute(httpget);
response.close();
}
}
{code}
I think these are non-deprecated versions, but I'm not saying this is the only
or the correct place to fix this at. It was just what I used to reproduce what
I think is the root-cause on the current development branch. I have not
contributed to this project before, which is why this is only a suggestion of
where/how this might be fixed.
> Enrich ConnectException with remoteAddress
> ------------------------------------------
>
> Key: HTTPCLIENT-1586
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1586
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: HttpConn
> Affects Versions: 4.4 Beta1
> Reporter: Gerhard Poul
> Priority: Minor
> Attachments: httpclient-1586-patch1.patch
>
>
> When a ConnectException is thrown by Java it only contains information like
> "connection refused", but not the remoteAddress that we tried connecting to
> and while some code paths in HttpClient log this as info the core Exception
> is just propagated to the end-user.
> I propose to either change the description of the original ConnectException
> or create a new httpclient-specific ConnectException like java.rmi does.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]