You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Oleg Kalnichevski <o....@dplanet.ch> on 2003/05/14 22:20:20 UTC
Re: DO NOT REPLY [Bug 19868] - Need the
InterruptedIOException when timeout
I agree it does seem to be an overkill in this particular case. But I
personally find the flexibility offered by chained exceptions worth
paying the price. This might wait until 2.1, though.
You are absolutely right about the overall concept of exception
handling getting a bit vague. There used to be a pretty clear
convention before with HttpException representing protocol errors and
IOException representing transport errors. It got lost somehow.
I think we do not have to invent much. We just have to be a bit more
stringent about respecting the convention that has already been
established.
Cheers
Oleg
On Wed, 2003-05-14 at 21:48, Jandalf wrote:
> The SomeOtherGawdAwefulException was just an example of continuing the
> idea to have another Exception type possibly contained in the
> ChainedException class. We are not going through all this work just
> because there will only ever be one chained exception, IIOE, right?
>
> I'm not against exception chaining, but we are taliking about changing
> the semantics of the exception handling for the sake of exposing another
> exception type while preserving the interface. It just does not feel
> good over here; it does not seem fully motivated.
>
> Thinking about this a bit more, we really do not have any "Exception
> rules" for exceptions thrown out to user code. We just have some casual
> conventions that determine which exceptions are thrown out, which are
> converted to HttpClient types and which are swallowed.
>
>
>
> bugzilla@apache.org wrote:
>
> >DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
> >RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> ><http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19868>.
> >ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
> >INSERTED IN THE BUG DATABASE.
> >
> >http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19868
> >
> >Need the InterruptedIOException when timeout
> >
> >
> >
> >
> >
> >------- Additional Comments From olegk@apache.org 2003-05-14 19:37 -------
> >Actually I do not. The problem is that HttpClient#executeMethod may not throw
> >SomeOtherGawdAwefulException (unless it's a runtime exception or a sub class of
> >either IOException or HttpException). The only way to get hold of the original
> >exception along with all its properties is to chain it. The alternative would be
> >to implement all the possible exception types as sub classes of HttpException,
> >which is in my opinion is as ugly. Exception chaining is the most flexible way
> >of dealing with heterogeneous exceptions, and flexibility usually carries a
> >price tag.
> >
> >Oleg
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
> >
> >
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>