camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Camel 2.0 API - Discuss - Exchange.getException() change to Exception
Date Wed, 11 Mar 2009 11:37:31 GMT
Hi,

I just checked the servicemix-camel component , it will not be effect by
this change.

So I +1 for this change.

Willem

James Strachan wrote:
> 2009/3/10 Claus Ibsen <claus.ibsen@gmail.com>:
>> Hi
>>
>> The Exchange.getException() method is based on Throwable. I think this
>> is wrong and we should change it to Exception.
>>
>> We should let the java.lang.Error left alone to the JDK itself to
>> handle it, so end users cannot try .. catch(Throwable) and thus
>> hide java.lang.OutOfMemoryError etc.
>>
>> The camel-core has this issue as well with catching Throwables around
>> its code. It should only catch Exception.
>> And I am prepareing a patch to fix this.
>>
>> Any objections to change it to Exception and fix the camel-core?
> 
> Sounds fine to me. So long as we can catch programming bugs (e.g.
> NullPointerException in some custom processor code) that should be
> fine.
> 


Mime
View raw message