use of org.apache.camel.builder.ErrorHandlerBuilderRef in project camel by apache.
the class ContextScopedOnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest 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:foo").errorHandler(new ErrorHandlerBuilderRef("myDLC")).to("mock:foo").throwException(new IOException("Damn IO"));
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 ContextScopedOnExceptionNotHandledErrorHandlerRefIssueTwoRoutesTest 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(false).to("mock:handled").end();
from("direct:foo").to("mock:foo").throwException(new IOException("Damn IO"));
from("direct:start").to("mock:a").throwException(new IllegalArgumentException("Damn"));
}
};
}
use of org.apache.camel.builder.ErrorHandlerBuilderRef in project camel by apache.
the class ContextScopedOnExceptionNotHandledRouteScopedErrorHandlerRefIssueTwoRoutesTest method createRouteBuilder.
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
onException(IllegalArgumentException.class).handled(false).to("mock:handled").end();
from("direct:foo").errorHandler(new ErrorHandlerBuilderRef("myDLC")).to("mock:foo").throwException(new IOException("Damn IO"));
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 OnExceptionErrorHandlerRefIssueTest method createRouteBuilder.
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
errorHandler(new ErrorHandlerBuilderRef("myDLC"));
from("direct:start").onException(IllegalArgumentException.class).handled(true).to("mock:handled").end().to("mock:a").throwException(new IllegalArgumentException("Damn"));
}
};
}
use of org.apache.camel.builder.ErrorHandlerBuilderRef in project camel by apache.
the class OnExceptionRouteScopedErrorHandlerRefIssueTwoRoutesTest method createRouteBuilder.
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:foo").errorHandler(new ErrorHandlerBuilderRef("myDLC")).to("mock:foo").throwException(new IllegalArgumentException("Damn Foo"));
from("direct:start").errorHandler(new ErrorHandlerBuilderRef("myDLC")).onException(IllegalArgumentException.class).handled(true).to("mock:handled").end().to("mock:a").throwException(new IllegalArgumentException("Damn"));
}
};
}
Aggregations