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

CLI: Handle FileNotFoundException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: s7
    • Fix Version/s: s10
    • Component/s: None
    • Labels:
      None

      Description

      If you specify a file that is not found (test file, schema file, etc.), you get the "An unexpected exception occurred" message. I'm assuming we want the code to actually handle this exception and provide the use with a simple message stating which file was not found, with no error trace.

      My output:

      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      !! An unexpected exception occurred. This is a bug! !!
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

      Please help us fix this by opening a bug report at:

      https://opensource.ncsa.illinois.edu/jira/browse/DFDL

      Please include the following exception, the command you
      ran, and any input, schema, or tdml files used that led
      to this bug.

      java.io.FileNotFoundException: daffodil-perf/dns.cap (No such file or directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:138)
      at java.io.FileInputStream.<init>(FileInputStream.java:97)
      at edu.illinois.ncsa.daffodil.Main$.run(Main.scala:328)
      at edu.illinois.ncsa.daffodil.Main$.main(Main.scala:514)
      at edu.illinois.ncsa.daffodil.Main.main(Main.scala)

      the command I used:

      ./daffodil-core/target/start parse -s daffodil-perf/src/test/resources/edu/illinois/ncsa/daffodil/pcap/pcap.dfdl.xsd daffodil-perf/dns.cap

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              jadams Joshua Adams
              Reporter:
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Tasks