camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: [DISCUSS] camel-bindy - Error handling
Date Wed, 14 Dec 2011 09:35:50 GMT
On Tue, Dec 13, 2011 at 4:02 AM, kmonging <> wrote:
> Hello all,
> While using fixed length bindy to convert string to date data type, I
> encountered an IllegalArgumentException, java.text.ParseException:
> Unparseable date: "                "
> Is it possible an annotation [lenient=true], to have the error logged under
> warning and have it continue processing the rest of the content.

Maybe Bindy should just ignore empty/null/0 fields for Date fields
which have been marked as @required = false.
Then you can mark the field as not required.

The lenient option on Date is for parsing weird date inputs, such as
overflows for months etc. I don't think its such a good idea.
I have yet to see anyone who likes the 14th month to be regarded as
February etc.

> At the same time, another annotation [default="camel rox"], to set the value
> of the field to "camel rox" while catching error, such as ParseException.

Yeah we could introduce an attribute to set a default value.

> What do you think?

Feel free to create a JIRA ticket.

And as we love contributions, patches is welcome.

> Thanks and regards,
> Kmonging
> --
> View this message in context:
> Sent from the Camel Development mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message