Servicemix + Camel - error handling issue

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Servicemix + Camel - error handling issue

Laurentiu Trica-2
Hello,

I'm using Servicemix 5.1.2 and I have a camel with a route which uses a
doTry / doCatch.

The bellow example* doesn't work as expected. I mean the exception is
caught, but even if the handled is set to false, the exception doesn't end
up in my logs. The exception is thrown further, but the logs don't show it
anymore.

<route>
    <from uri="direct:start"/>
    <doTry>
        <process ref="processorFail"/>
        <to uri="mock:result"/>
        <doCatch>
            <exception>java.io.IOException</exception>
            <!-- mark this as NOT handled, eg the caller will also get the
exception -->
            *<handled>*
*                <constant>false</constant>*
*            </handled>*
            <to uri="mock:io"/>
        </doCatch>
    </doTry>
</route>

* copied from: https://access.redhat.com/documentation/en-US/Red_
Hat_JBoss_Fuse/6.2.1/html/Apache_Camel_Development_Guide/BasicPrinciples-
ExceptionHandling.html#BasicPrinciples-ExceptionHandling-doTry-Rethrow

Can you please help?

Thanks,
Laurentiu