camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morten Engel>
Subject onException and .process()
Date Fri, 27 Aug 2010 17:17:34 GMT


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;

.setHeader("subject", constant("headersubject")
.process(new Processor() {
   public void process(Exchange exchange) {
     //alter exchange body to include info from my Exception

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:
Sent from the Camel - Users mailing list archive at

View raw message