use of org.apache.camel.builder.ErrorHandlerBuilderRef in project camel by apache.
the class ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTest method createRouteBuilder.
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
onException(IllegalArgumentException.class).handled(true).to("mock:handled").end();
from("direct:start").errorHandler(new ErrorHandlerBuilderRef("myDLC")).to("mock:a").throwException(new IllegalArgumentException("Damn"));
}
};
}
use of org.apache.camel.builder.ErrorHandlerBuilderRef in project camel by apache.
the class ContextScopedOnExceptionErrorHandlerRefIssueTest method createRouteBuilder.
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
errorHandler(new ErrorHandlerBuilderRef("myDLC"));
onException(IllegalArgumentException.class).handled(true).to("mock:handled").end();
from("direct:start").to("mock:a").throwException(new IllegalArgumentException("Damn"));
}
};
}
Aggregations