Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1696

Explore withParseErrorThrowing uses

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: Back End
    • Labels:
      None

      Description

      When exprssions are evaluated, they might throw a ParseError if something fails (e.g. a cooker fails, conversion from string to int fails, etc.). These ParseErrors need to be immediately caught, otherwise the Exception may propagate up too far. We should reexamine all the uses of withParseErrorThrowing, and ensure there all uses of expressions use it as appropriate. We may want to rename it to something like withExpressionThatMayThrow or something to clarify when it should be uses.

      Furthermore, one side effect of withParseErrorThrowing is that it allocations an anonymous functions, which does show up in profiling. We should determine if this has a noticeable affect on performance, and if so, think up some other kind of idiom to solve this problem. Perhaps something like Evaluatable's should handle the catch of parse errors, set the state to failed, and then calls to evaluate must check the result, just like we do when calling parser.parse().

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              slawrence Steve Lawrence
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Tasks

                  Progress: 
                   0/0