Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2356

Confusing diagnostic with a PE is the cause of another PE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Diagnostics
    • None

    Description

      When delimiter scanning fails to find a delimiter, it creates a PE that is something like "Separator foo not found". The SeparatorParseHelper will checked for failures and create a new PE that's something like "Failed to parse infix separator", providing the first as a cause. This can be confusing because both the new PE and the cause PE include context information.
      Furthurmore, the cause PE is also a separate diagnostic, so it too is printed. So the output of such a failure looks something like:

      Parse Error: Failed to parse infix separator. Cause: Separator foo not found
      Schema Context: context for cause PE
      Schema Context: context for new PE
      ParseError: Separator foo not found
      Schema Context: context for cause PE
      

      This nesting of contexs and duplciate PE makes for a very confusing and unclear diagnostic.

      Perhaps we shouldn't include PE as a cause for other PE's to avoid this nesting, especially considering the cause PE will already be output as a diagnostic?

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: