What code do you do in the processor?

On Fri, Aug 27, 2010 at 7:17 PM, Morten Engel <m...@alpha-solutions.dk> wrote:
>
> Hi,
>
> I'm having a problem using a .process inside my onException handling. I
> enter the Processor just fine, but exiting it, causes the original exception
> to be thrown.
>
> What I want to do is basicly;
>
> onException(ExceptionType.class)
> .useOriginalBody()
> .handled(true)
> .setHeader("subject", constant("headersubject")
> .process(new Processor() {
>   public void process(Exchange exchange) {
>     //alter exchange body to include info from my Exception
>   }
> .to(http-endpoint);
>
> Any log messages I include in the processor are logged before it exits, but
> as soon as I'm done with the Processor, the exception is thrown. I've tried
> to do a "exchange.setException(null);", but with no luck, try/catch blocks
> inside the Processor did not help me either.
>
> Is there anyway to remove or surppress this exception? Or any other smart
> ways to include exception information into my originalBody, in order for me
> to send an exact error mail?
>
> Any hints would be greatly appreciated.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/onException-and-process-tp2740331p2740331.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

Reply via email to