You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jeremy Ross (Jira)" <ji...@apache.org> on 2022/02/03 20:46:00 UTC
[jira] [Created] (CAMEL-17598) camel-bindy: Handle parse failures
Jeremy Ross created CAMEL-17598:
-----------------------------------
Summary: camel-bindy: Handle parse failures
Key: CAMEL-17598
URL: https://issues.apache.org/jira/browse/CAMEL-17598
Project: Camel
Issue Type: Improvement
Components: camel-bindy
Affects Versions: 3.14.1
Reporter: Jeremy Ross
If bindy fails to parse a value, say a date, an exception is thrown and the entire unmarshal operation is aborted. It would be nice if the exception could be handled and processing could resume. We'd probably also want a way to specify a default value in the case of a parse failure.
Here are some choices that need to be made:
* A way to indicate unmarshaling should resume in the event of a parse failure. Where would this live? Options are at the component option level, {{@CsvRecord}} level, and {{@DataField}} level. Maybe all of these with each one successively overriding the higher level setting. But maybe that's too complex. What would this be called? {{continueOnParseFailure}}? Is this even the right concept?
* A way to specify a default value to use when a parse fails. {{@DataField}} already has a {{defaultValue}} element, so maybe we use this value in the event of a failure. If {{defaultValue}} is not set, it could default to null or the default value for a primitive type.
Zulip chat: https://camel.zulipchat.com/#narrow/stream/257298-camel/topic/Bindy.20continue.20on.20parse.20exception
--
This message was sent by Atlassian Jira
(v8.20.1#820001)