I noticed a lot of problems with exception handling in Camel lately
and I created an issue for this (CAMEL-346). Moreover I already have a
solution for it implemented, but I wanted to be sure that logic that I
implemented is OK as it breaks two of our JUnit tests.
I sent an email with the question, but no response so far (don't you
read camel-dev guys? ;) )
As fast I receive some answer (or timeout happens) I'll commit this
fix and close the issue.
Moreover I'll add your case to test cases to be sure, that your
problem is handled properly (so thank you for this snippet of code).
Roman
2008/2/28, cmdr <[EMAIL PROTECTED]>:
>
> I think that the error is not solved.
>
> When I use exception handler outside of a route, my errors are catched.
> When I use exception handler inside of a route, my errors are not catched.
>
> //this catch exception, I get message in my queue
> //exception(SQLException.class).to("activemq:queue:SQLException");
>
>
> //this does not work, I never get message in my queue
> RouteType routeType = from(XXX);
> TryType tryType = routeType.tryBlock();
>
> tryType
>
> .process(new Processor()
> {
> public void process(Exchange exchange) throws Exception
> {
>
> throw new Exception("Processing Exception");
> }
> })
> .to("activemq:queue:message_string");
>
> tryType
> .handle(Exception.class)
> .setBody(constant("exception"))
> .to("activemq:queue:SQLException");:-/
>
> I can use the global exception handler but how to get the exception trace ?
> I would like to set it has the body of my message.:confused:
>
> cmdr
>
> --
> View this message in context:
> http://www.nabble.com/Camel-1.2---CatchProcessor-not-working--tp13405439s22882p15747053.html
>
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>