Search in sources :

Example 1 with OnExceptionRouteNode

use of org.apache.camel.impl.OnExceptionRouteNode in project camel by apache.

the class TraceInterceptor method traceOnException.

private void traceOnException(TracedRouteNodes traced, Exchange exchange) throws Exception {
    if (traced.getLastNode() != null) {
        traced.addTraced(new DefaultRouteNode(traced.getLastNode().getProcessorDefinition(), traced.getLastNode().getProcessor()));
    }
    traced.addTraced(new OnExceptionRouteNode());
    // log and trace so we have the from -> onException event as well
    logExchange(exchange);
    traceExchange(exchange);
    traced.addTraced(new DefaultRouteNode(node, super.getProcessor()));
}
Also used : OnExceptionRouteNode(org.apache.camel.impl.OnExceptionRouteNode) DefaultRouteNode(org.apache.camel.impl.DefaultRouteNode)

Aggregations

DefaultRouteNode (org.apache.camel.impl.DefaultRouteNode)1 OnExceptionRouteNode (org.apache.camel.impl.OnExceptionRouteNode)1