You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by developpef <sr...@orange.fr> on 2013/01/23 11:20:29 UTC

Exceptions management

Hello,

This message to get more explanations on exceptions management on routes.

Here is my app :

I created a custom MyException extending RuntimeCamelException (wich extends
Exception).

My routes are :

onException(MyException.class).handled(true).log("FATAL").end();

from("...").onException(Exception.class).log("LOCAL_ERROR").end().to(myBean);

MyBean is throwing a MyException. 

I was surprised to see that it was cached in the general onException route
(with log "FATAL") and not in the local route (with log "LOCAL_ERROR").

Is this due to the extension of RuntimeCamelException or do I missed
something?

Thanks



-----
http://developpef.blogspot.com
--
View this message in context: http://camel.465427.n5.nabble.com/Exceptions-management-tp5726051.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Exceptions management

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Jan 24, 2013 at 11:20 AM, developpef <sr...@orange.fr> wrote:
> We currently use 2.10.2
>

We fixed someting relate to route vs context scoped error handler.
Can't remember if it was before or after this version.
As we say on the support page, try with newer releases
http://camel.apache.org/support


>
>
> -----
> http://developpef.blogspot.com
> --
> View this message in context: http://camel.465427.n5.nabble.com/Exceptions-management-tp5726051p5726143.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Exceptions management

Posted by developpef <sr...@orange.fr>.
We currently use 2.10.2



-----
http://developpef.blogspot.com
--
View this message in context: http://camel.465427.n5.nabble.com/Exceptions-management-tp5726051p5726143.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Exceptions management

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jan 23, 2013 at 11:20 AM, developpef <sr...@orange.fr> wrote:
> Hello,
>
> This message to get more explanations on exceptions management on routes.
>
> Here is my app :
>
> I created a custom MyException extending RuntimeCamelException (wich extends
> Exception).
>
> My routes are :
>
> onException(MyException.class).handled(true).log("FATAL").end();
>
> from("...").onException(Exception.class).log("LOCAL_ERROR").end().to(myBean);
>
> MyBean is throwing a MyException.
>
> I was surprised to see that it was cached in the general onException route
> (with log "FATAL") and not in the local route (with log "LOCAL_ERROR").
>
> Is this due to the extension of RuntimeCamelException or do I missed
> something?
>

What Camel version do you use?


> Thanks
>
>
>
> -----
> http://developpef.blogspot.com
> --
> View this message in context: http://camel.465427.n5.nabble.com/Exceptions-management-tp5726051.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen