You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by cwilliamy2k <cw...@yahoo.com> on 2009/06/15 11:14:14 UTC
Question on DeadLetterChannel
Hi,
May i know if there's a way to get the original exception from the
DeadLetterChannel?
This is because I want to customize the way it is logged.
Thanks in advance.
Regards,
William
--
View this message in context: http://www.nabble.com/Question-on-DeadLetterChannel-tp24031262p24031262.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Question on DeadLetterChannel
Posted by cwilliamy2k <cw...@yahoo.com>.
Cool! I can get the exception now. Thanks.
Regards,
William
Claus Ibsen-2 wrote:
>
> On Mon, Jun 15, 2009 at 11:14 AM, cwilliamy2k<cw...@yahoo.com>
> wrote:
>>
>> Hi,
>>
>> May i know if there's a way to get the original exception from the
>> DeadLetterChannel?
>> This is because I want to customize the way it is logged.
> You can get the caused exception as a property on the exchange
>
>
> Camel 2.0 has a 2nd parameter for the type
> Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT,
> Exception.class);
>
>
> Camel 1.x you can use regular type cast
> Exception cause = (Exception)
> exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
>
>
>
>>
>> Thanks in advance.
>>
>> Regards,
>> William
>> --
>> View this message in context:
>> http://www.nabble.com/Question-on-DeadLetterChannel-tp24031262p24031262.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>
--
View this message in context: http://www.nabble.com/Question-on-DeadLetterChannel-tp24031262p24031524.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Question on DeadLetterChannel
Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Jun 15, 2009 at 11:14 AM, cwilliamy2k<cw...@yahoo.com> wrote:
>
> Hi,
>
> May i know if there's a way to get the original exception from the
> DeadLetterChannel?
> This is because I want to customize the way it is logged.
You can get the caused exception as a property on the exchange
Camel 2.0 has a 2nd parameter for the type
Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT,
Exception.class);
Camel 1.x you can use regular type cast
Exception cause = (Exception) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
>
> Thanks in advance.
>
> Regards,
> William
> --
> View this message in context: http://www.nabble.com/Question-on-DeadLetterChannel-tp24031262p24031262.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus