camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hadrian Zbarcea <>
Subject Re: [DISCUSS] Faults and Exceptions in Camel
Date Fri, 10 Jul 2009 13:54:04 GMT

Freedom can be a dangerous thing :).

With overwhelming consensus I'll crate a jira and implement this  
before Monday using James' proposal #3 with

Thanks everybody for pitching in

On Jul 10, 2009, at 8:26 AM, Roman Kalukiewicz wrote:

> 2009/7/9 Claus Ibsen <>:
>> I think the names should be
>> boolean isFault()
>> void setFault()
>> Yeah I do not think people should call setFault(false)
>> or later want to change an existing OUT message from fault to out  
>> or vice versa.
>> But is it confusing with a setter that dont accept parameters, does  
>> it
>> violate the bean spec?
> I would propose to leave setFault(boolean) anyway. Does it hurt anyone
> if we give more freedom to our users? I can easily imagine situation
> when I call CXF endpoint, receive a fault and then want to simply send
> it to JMS queue whatever the response was. Then I just clear the fault
> flag and I'm done.
> Another thing is how faults (if they exist) should be handled. I
> believe we should have our error handling extended so we can write
> something like:
> .doTry()
> .to("cxf:bean:faultThrowingService")
> .doCatch(body().instanceOf(MyFault.class))
> ...
> .end()
> It can handle faults almost like exceptions but it has more
> flexibility (but it is core API discussion anymore).
> Roman

View raw message