You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by kmonging <km...@gmail.com> on 2011/12/13 04:02:40 UTC
[DISCUSS] camel-bindy - Error handling
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.
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.
What do you think?
Thanks and regards,
Kmonging
--
View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-camel-bindy-Error-handling-tp5070204p5070204.html
Sent from the Camel Development mailing list archive at Nabble.com.
Re: [DISCUSS] camel-bindy - Error handling
Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Dec 13, 2011 at 4:02 AM, kmonging <km...@gmail.com> 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.
http://camel.apache.org/contributing.html
> Thanks and regards,
> Kmonging
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/DISCUSS-camel-bindy-Error-handling-tp5070204p5070204.html
> Sent from the Camel Development mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/