On Tue, Aug 4, 2009 at 9:27 AM, juhasiltanen<juhasilta...@gmail.com> wrote: > > I have a simple routing configuration of > onException(MyException.class).to(myEndpoint) > > Then I have a simple implementation of a Processor interface reading from > myEndpoint (that receives an Exchange), let's call it MyProcessor. > > How do I get the instance of MyException thrown from the depths of the > application to MyProcessor? > > Exchange.getException returns null, and this is the place I would expect > MyException to be found.
No its not as when you do routing in the onException then you handle it. You can get the caused exception from a property In Camel 2.0 Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); And its about the same in 1.x the key is different though See more here: http://camel.apache.org/exception-clause.html In the section "using a processor as failure handler" > > Thank's in advance! > -- > View this message in context: > http://www.nabble.com/Routing-with-RouteBuilder-and-onException%2C-missing-the-Exception-instance-tp24803541p24803541.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus