On Tue, Feb 28, 2012 at 5:39 AM, Frank <fdrew...@gmail.com> wrote: > Hi, > > I am able to catch Exception sucessfully using > onException()/doTry...doCatch(). But, I don't know how rethorw the same > exception to the caller. Can any one please help me? >
The caused exception is stored as a property on the Exchange with the key: Exchange.EXCEPTION_CAUGHT When using a bean Camel can bind the caused exception to a parameter of the type Exception, so you can do as below: public class MyExceptionThrower public static void throwUp(Exception e) throws Exception { throw e; } } And then route the message to this bean. > Thanks, > Frank > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-rethrow-a-caught-exception-in-CAMEL-tp5520830p5520830.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/