camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: [DISCUSS] Faults and Exceptions in Camel
Date Thu, 09 Jul 2009 17:27:45 GMT
On Thu, Jul 9, 2009 at 7:18 PM, Hadrian Zbarcea<hzbarcea@gmail.com> wrote:
> Yeah, exactly, but createFault() confused me a bit.  I don't really se a
> place for it.  I understand these two proposals, what's the third (complete)
> proposal?
>
> 1. the original one which Claus seemed to not like, dunno why.
>   Message getOut();
>   void setOut(Message out);
>   boolean hasFault();
>   void setFault();
> (setFault() does not need a boolean arg, as an fault cannot become an out, I
> think.  setOut() would reset the fault flag)
Is it intended that setFault() do not accept any parameters?



>
> 2.
>   Message getOut();
>   void setOut(Message out);
>   Message getFault();
>   void setFault(Message fault);

Yeah this is nice and simple. Not confusing as OUT and FAULT have
excactly the same set of methods,


And the 3. could be James idea

This is on Message. - This is on Message - This is on Message. (not Exchange)

void setFault(boolean fault)
boolean isFault()

Then we do not need the fault on Exchange at all.



>
> Am I missing something?
>
> Hadrian
>
> On Jul 9, 2009, at 1:07 PM, James Strachan wrote:
>
>> 2009/7/9 Hadrian Zbarcea <hzbarcea@gmail.com>:
>>>
>>> @James, yes it would, but why have createFault()?  Why not have it closer
>>> to
>>> what it is now with
>>>
>>> Message getFault();
>>> void setFault(Message fault);  // instead of create fault
>>> (and then we won't need the setFault(boolean);)
>>
>> As we're musing about having a single property called "out" which may
>> be marked as a fault or not.
>>
>>
>> --
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
>> Open Source Integration
>> http://fusesource.com/
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message