camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james.strac...@gmail.com>
Subject Re: Camel 2.0 API - Discuss - Exchange.getException() change to Exception
Date Wed, 11 Mar 2009 11:20:10 GMT
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.

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Mime
View raw message