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

PCAP: Modify Version # elements for clearer Assertion failure message

XMLWordPrintableJSON

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • s14
    • s14
    • Diagnostics
    • None

      When testing out the new validation of the pcap schema, I modified the icmp input file so the version was 1.4 instead of 2.4. The parse failed as expected, but this is the output:

      [error] Parse Error: Assertion failed. PCAP version must be 2.4
      Parsed value was: <PCAPHeader>...</PCAPHeader>
      ....

      from Steve:
      the assert is on the header, not the version major/minor elements. It
      might not be a bad idea to show one depth deeper into the infoset for
      the 'Parsed value was' thing. However, this would show the entire header
      and be a bit too verbose, which wouldn't be too useful. To get around
      that we could add a sequence, so the schema would be something like:

      <PCAPHeader>
      ...
      <Version>
      <Major>1</Major>
      <Minor>4</Minor>
      </Version>
      ...
      </PCAPHeader>

      Then put the assert on the Version element. Changing the schema to
      output that, plus going one layer deeper on the parsed value would give
      something like:

      Parsed value was: <Version><Major>1</Major><Minor>4</Minor></Version>

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 4 minutes
                  4m