hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Re-throwing URISyntaxException; was: Re: API review request / HttpException subclass of IOException
Date Mon, 26 May 2008 21:16:12 GMT
Jens Wilke wrote:
> On Monday 26 May 2008, Oleg Kalnichevski wrote:
>> I do not mind catching ´╗┐URISyntaxExceptions and re-throwing them as
>> HttpExceptions. I will happily take a patch for that.
> That is exaclty the problem. The more different exception hierachies get
> introduced the more re-throwing occurs. I really like the error outputs with
> five different stack traces for a single source of exception.
> So we have:
> - re-throwing isn't nice
> - if we don't rethrow all usages of HttpGet&Co need an extra catch
> - third option: don't use the java.net.URI internally
> All three: not nice!

Well, if we want to use j.n.URI class we cannot avoid having to deal 
with URISyntaxExceptions, can we? But what we certainly could do is to 
catch them and rethrow as HttpProtocolException _inside_ HttpClient 
classes, so that users do not have to bother about it on the application 

Hope this makes my point of view somewhat clearer.



> Best,
> Jens

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

View raw message