You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gnanaguru S <gn...@gmail.com> on 2014/06/23 09:31:58 UTC
Throw exception on Exception
Hello Camel Folks,
In my global error handler I am throwing a custom exception which is handled
by another global handler.
Is it a valid flow in camel ?
When I unit tested, It throws custom exception even in positive scenario :(
*<onException>*
<exception>org.apache.camel.ValidationException</exception>
<continued>
<constant>true</constant>
</continued>
<setBody>
<simple><data/></simple>
</setBody>
<to ref="response-primary-xslt" />
<doTry id="validate-error-response">
<to uri="validator:schemas/elements-v1.xsd" />
<doCatch>
<exception>org.apache.camel.ValidationException</exception>
*<throwException ref="customException" />*
</doCatch>
</doTry>
*</onException>*
*<onException>*
<exception>com.company.CustomException</exception>
<handled>
<constant>true</constant>
</handled>
<to ref="response-secondary-xslt" />
*</onException>*
Bean reference:
<bean id="<b>customException*" class="com.company.CustomException"/>
Cheers
Guru
gnanaguru.com
--
View this message in context: http://camel.465427.n5.nabble.com/Throw-exception-on-Exception-tp5752693.html
Sent from the Camel - Users mailing list archive at Nabble.com.