Many thanks.
On Sat, Aug 15, 2009 at 5:34 PM, Claus Ibsen wrote:
> Hi
>
> You need the to span the entire route such as
>
>
> class="org.apache.camel.issues.TryCatchWithSplitNotHandledIssueTest$GenerateError"/>
>
>http://camel.apache.org/schema/spring";>
>
>
>
Hi
You need the to span the entire route such as
http://camel.apache.org/schema/spring";>
java.lang.Exception
false
Here is a new case that I test using direct as endpoint between split and
try/catch block. This becomes crazy and in this case, the mock:error
receives three times the error and the mock result nothing. I think that in
this case, the exchanges are processed separately and we lost the loop
available
I try to translate the syntax of Java DSL into Spring DSL.
java.lang.Exception
Thx.
With the following syntax, it works :
public void testSplitWithError() throws Exception {
MockEndpoint error = getMockEndpoint("mock:error");
error.expectedBodiesReceived("James");
error.message(0).property(Exchange.EXCEPTION_CAUGHT).isNotNull();
MockEndpo
You need try .. catch around the template when you send a message as
you do NOT handle the exception and thus the client get this exception
back.
On Fri, Aug 14, 2009 at 2:43 PM, Charles Moulliard wrote:
> I have adapted the test case as you propose but it fails.
>
> org.apache.camel.CamelExecuti
I have adapted the test case as you propose but it fails.
org.apache.camel.CamelExecutionException: Exception occured during execution
on the exchange: Exchange[Message: Hello Willem]
at
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1027)
at
org.apache.ca
Hi
Works fine I will commit an unit test later when Hadrian is done with
the build of Camel 2.0 release.
2 messages goes to mock:result
1 message go to mock:error
All as expected.
Since you use doTry .. doCatch the client will not receive any
exception as he will not do that either when you do
Hi
But Camel is smart and flexible so it allows you to lower the handled
flag on doCatch (noticed handled(false)) so you can do like this, in
which the client will get the exception back in his face. And the
mock:error can see the caused exception from a property on the
exchange
MockEndpo
Many thank.
I will test now the Spring DSL version as this is with Spring DSL that I
have the issue in my camel route project.
Regards,
Charles
On Fri, Aug 14, 2009 at 10:44 AM, Claus Ibsen wrote:
> Hi
>
> Works fine I will commit an unit test later when Hadrian is done with
> the build of C
Hi,
I'm back again with try/catch and split. I have created the following unit
test who seems to work but I don't understand why the try/catch block of the
test does not receive the error ?
Code
package org.apache.camel.processor;
import org.apache.camel.ContextTestSupport;
// import org.apache
11 matches
Mail list logo