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 Thu, 09 Jul 2009 17:04:38 GMT
@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);)

To me it looks pretty clean and simple.

if we set the OUT field with a header or not would be an  
implementation detail.

 From what it looks we may have a solution soon.  Any more thoughts on  
the IN vs OUT question?


On Jul 9, 2009, at 12:47 PM, James Strachan wrote:

> 2009/7/9 Claus Ibsen <>:
>> Hi
>> I think it would be confusing if there is a setFault but no getFault?
>> But I understand the reason when you want to use OUT for both regular
>> OUT and FAULT. Where a header determine the type.
>> As its uncommon to set a fault we could as James suggested have a
>> factory method on Exchange to create a new one:
>> Message msg = exchange.createFault();
>> msg.setBody("Unknown order id " + id);
>> exchange.setOut(msg);
> I wonder if this latter line is required? i.e. should
> exchange.createFault() internally set the OUT?
> -- 
> James
> -------
> Open Source Integration

View raw message