On Wed, Mar 11, 2009 at 12:20 PM, James Strachan
<james.strac...@gmail.com> wrote:
> 2009/3/10 Claus Ibsen <claus.ib...@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.
? NPE is a RuntimeException so it would be just as it always have been.

Its just that we let java.lang.Error to the JDK itself, so when it
reports OutOfMemoryError, and that infinite stack trace error and what
else then Camel do NOT catch it.



>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://fusesource.com/
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Reply via email to