I should have specified the version...  We're using Camel 2.6.

On Fri, Feb 3, 2012 at 10:16 AM, Samuel Cox <crankydi...@gmail.com> wrote:
> Hi,
>
> I'm trying to define a route specific exception handling mechanism.
> It's purpose is to apply a custom format to the response body of an
> HTTP response.  My route is:
>
>   <camel:route id="my-servlet">
>      <camel:from
> uri="servlet:///?servletName=diAdapterServlet&amp;matchOnUriPrefix=true&amp;disableStreamCache=true"/>
>      <camel:onException>
>        <camel:exception>java.lang.Exception</camel:exception>
>        <camel:redeliveryPolicy maximumRedeliveries="0"/>
>        <camel:handled>
>          <camel:constant>true</camel:constant>
>        </camel:handled>
>        <camel:to uri="exceptionHandlingProcessor"/>
>      </camel:onException>
>      <camel:to  uri="httpInboundLoggingProcessor"/>
>      <camel:to uri="httpToServicesProcessor"/>
>      <camel:to uri="httpOutboundLoggingProcessor"/>
>    </camel:route>
>  </camel:camelContext>
>
>
> Exception Handler is defined like so:
>
> public class ExceptionHandlingProcessor implements Processor {
>    public void process(Exchange exchange) throws Exception {
>        System.out.println("hi from error!");
>    }
> }
>
> Nothing appears to go through that handler though.  Any ideas on what
> I'm doing wrong would be greatly appreciated.

Reply via email to