Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.8.1
-
None
-
Unknown
Description
Here is the unit test to reproduce this issue:
package org.test; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; public class RecipientListTest extends CamelTestSupport { public static class Router { public String findEndpoint() { throw new RuntimeException("TestException!"); } } @Test public void recipientList() throws Exception { MockEndpoint endpoint = getMockEndpoint("mock://error"); endpoint.expectedMessageCount(1); sendBody("direct://parent", "Hello World!"); assertMockEndpointsSatisfied(); } @Override protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from("direct://parent") .onException(Throwable.class) .to("mock://error") .end() .to("direct://child"); from("direct://child") .errorHandler(noErrorHandler()) .recipientList(bean(Router.class)); } }; } }
Attachments
Issue Links
- is related to
-
CAMEL-4484 Using custom expression in RecipientList EIP which throws exception, is not triggering onException
- Resolved