camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sub3 <st...@subwest.com>
Subject Re: DeadLetter - Get Stack Trace
Date Sun, 22 Nov 2009 21:11:48 GMT

That works great.  Thanks.


Claus Ibsen-2 wrote:
> 
> On Sat, Nov 21, 2009 at 4:57 AM, sub3 <steve@subwest.com> wrote:
>>
>> Hi,
>>
>> I have the dead letter channel set up to catch errors:
>> errorHandler(deadLetterChannel("bean:DeadLetterChannelProcessor?method=handleError").maximumRedeliveries(1));
>>
>> I am getting the incoming object that is causing the error, but I would
>> also
>> like to get the error/exception this is thrown.  Is there anyway to
>> configure this to get that?
>>
> 
> Yeah since you use a bean you can just add Exception cause as a
> parameter to your handleError method, eg.
> 
> public void handleError(Object body, Exception exception)
> 
> There is a bit more info here
> http://camel.apache.org/bean-binding.html
> 
> or get it from the Exchange where its stored in a property. I think
> the key is this name but you may have to double check yourself.
> 
> Exception cause = Exchange.getProperty(Exchange.EXCEPTION_CAUGHT,
> Exception.class);
> 
> In 1.x the key for the property may reside on a different class. Just
> take a look with the debugger what the Exchange properties looks like
> and you can find the cause exception in there.
> 
> 
> 
>> Thanks.
>>
>> --
>> View this message in context:
>> http://old.nabble.com/DeadLetter---Get-Stack-Trace-tp26453580p26453580.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/DeadLetter---Get-Stack-Trace-tp26453580p26467896.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message