hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Exceptions getting silently eaten away
Date Wed, 05 Nov 2008 13:13:26 GMT
On Wed, 2008-11-05 at 18:02 +0530, hemant wrote:
> Hi,
> I am using httpcore-nio 4.0 beta 2, client extensions for consuming a
> web service which uses http push. I am quite perplexed by the behavior
> of library where its eating all the throw exceptions thrown in any of
> the callback methods silently.

They are not. In the asynchronous I/O model all events including
exceptions can be reported to the caller through a callback interface
only. One needs to provide the protocol handler with an instance of
EventListener in order to get notified of I/O and protocol errors. 

> Case in point, I am instantiating a ConsumingEntity in
> responseEntity() call, for handling responses asynchronously.
> Someitmes, my code in consumeContent() method throws unhandled
> exception, which is silently ignored.
> Is this the default behaviour? I am using this library from scala.

Yes, it is, unless an instance of EventListener is injected to the
protocol handler.  

HttpCore NIO is quite complex and poorly documented at the moment. I am
working on a tutorial to improve the situation, but it is still
incomplete and not so well written.




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

View raw message