Hi

You should post on the @user mailing list instead. The @dev is
reserved for discussing the development of Apache Camel.

On Wed, Jul 20, 2011 at 10:30 AM, Echo <[email protected]> wrote:
> Hello ,
> I have declared my CustomException class.
> When the onException() catches it , it goes to the processor I defined :
>
> onException(classOf[CustomException]).process(doSmth)
>
> So far so good .
> The issue that I need into the processor to check if the exception is of
> type "CustomException" or not
>
> when I write :
>
>  def process(exchange: Exchange) = {
>    val exception: Exception =
> exchange.getProperty(Exchange.EXCEPTION_CAUGHT, classOf[CustomException])
>
> *I got null *
>
> But when I write :
>
>  def process(exchange: Exchange) = {
>    val exception: Exception =
> exchange.getProperty(Exchange.EXCEPTION_CAUGHT, classOf[Exception])
>
> *I got my exception object *
>
> How could I check which type of exception is thrown into the processor !
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Fetch-Custom-Exception-from-the-exchange-tp4615141p4615141.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to