How to define exception to be thrown through ref in Apache Camel -


have throw exception in camel route defined in xml. found throwexception statement available camel 2.3 looks like:

 <throwexception ref="forced"></throwexception> 

however, don't know how define forced exception class thrown. since same exception thrown couple of times different exception messages - know if throwexception has other form of definition exception class , exception message defined in-place.

the ref reference can do

<bean id="forced" class="java.lang.illegalargumentexception">    <constructor-arg index="0" value="this forced"/> </bean>  <camelcontext ...>   ... </camelcontext> 

Comments