Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17598

camel-bindy: Handle parse failures



    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.14.1
    • 4.x
    • camel-bindy
    • None
    • Unknown


      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




            Unassigned Unassigned
            jeremyross Jeremy Ross
            1 Vote for this issue
            2 Start watching this issue