hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemant <gethem...@gmail.com>
Subject Re: Exceptions getting silently eaten away
Date Thu, 06 Nov 2008 12:34:49 GMT
On Wed, Nov 5, 2008 at 6:43 PM, Oleg Kalnichevski <olegk@apache.org> wrote:
> 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.

Well, I do have EventListenter attached. So all unhandled exceptions
are logged in as IOException (even though exception raised inside
attached callback methods is something else ?). Anyways, thanks for
the pointer.

> 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.
> http://wiki.apache.org/HttpComponents/HttpCoreTutorial

Hmm, I wasn't aware of existance of above page, thanks again. But I
think, javadoc would with inline documentation will be nicer solution.
Do you accept documentation patch? (Now that, I am somewhat familiar
with NIO API and internal implementation?)

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

View raw message