On Thu, Jul 12, 2012 at 9:14 AM, Hilde <[email protected]> wrote:
> Hello Claus!
>
> I have read chapter 5 more and more and more but the sense of a non handled
> exception
> I have not figured out. In addition in chapter 5 there is no sentence about
> the sense of a
> non handled exception.
>

Yes often people want to do a onException with handled(true). But
there are use-cases where you want the exception to not be handled,
and propagate back to the caller, and thus handled(false).
Handled(false) was the default behavior in Camel 1.x and therefore
kept as is in 2.x as well.

For example you can use this to do a logging saying that the exception
occurred but you could not handle it
for example

onException(IOException.class).maximumRedeliveries(3)
   .log("All redeliveries failed as well. We cannot process this
message. Exception not handled, and propagated back to the caller)
.end()



> Cheers
> Hilde
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Basic-knowledge-onException-tp5715861p5715922.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to