Uploaded image for project: 'Commons SCXML'
  1. Commons SCXML
  2. SCXML-80

SCXMLParser: Should the parser throw an exception on a parsing error?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8
    • 0.9
    • None

    Description

      I noticed that the SCXMLParser::DigestSrcAttributeRule() function only logs a message (and returns to continue parsing at next element) in case there is trouble in resolving the src-Attribute (i.e. to source in content from other SCXML documents). The particular use case is a wrong fraction of the src-Attribute of the <state> tag, i.e. if the state which was refered to using the url fraction does not exist in the target document.

      Thus when using the parser it is not possible to know whether the parsing was actually successful. In the above given use case the parser returns a valid - but incomplete - statemachine. And this is a severe problem.

      Hence, shouldn't the parsing error bubble up, e.g. using an exception?

      Attachments

        Activity

          People

            Unassigned Unassigned
            ingmar Ingmar Kliche
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: