Yes, i have looked all unit tests. In my case, abc method throws IOException. when i surround this bean class with .doTry and .doCatch(IOException.class) blocks, it never goes inside .doCatch(). Is exception from "abc" method is not being propagated to camel route? Why does it not go inside doCatch()?
My other ques is how does it know what is inside doCatch block? Does it find it out based on indentation? .doTry().bean() .doCatch() .bean(A.class, "abc") .bean(B.class, "abd") how does it know whether bean call to B.class is inside doCatch or not? On Fri, Jun 28, 2013 at 2:52 AM, Christian Müller < christian.muel...@gmail.com> wrote: > I cannot believe it. > Did you had a look at our unit tests [1]? > > [1] > > https://git-wip-us.apache.org/repos/asf?p=camel.git;a=tree;f=camel-core/src/test/java/org/apache/camel/processor/onexception;h=0b1ada52abb078e9e427b75cd362107557507ffc;hb=HEAD > > Best, > Christian > ----------------- > > Software Integration Specialist > > Apache Camel committer: https://camel.apache.org/team > V.P. Apache Camel: https://www.apache.org/foundation/ > Apache Member: https://www.apache.org/foundation/members.html > > https://www.linkedin.com/pub/christian-mueller/11/551/642 > > > On Thu, Jun 27, 2013 at 10:14 AM, Tarun Kumar <agrawal.taru...@gmail.com > >wrote: > > > My route configure method looks like this: > > > > public void configure() { > > > > > onException(IOException.class).handled(true).bean(ExceptionHandler.class, > > "handleException"); > > > > from().process().bean(firstBean.class, "abc").process().end(); > > } > > > > "abc" method of firstBean throws IOException, still, "handleException" > > method of ExceptionHandler class is not being invoked. What can be the > > reason? > > >