[
https://issues.apache.org/jira/browse/DAFFODIL-2944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17889299#comment-17889299
]
Steve Lawrence commented on DAFFODIL-2944:
------------------------------------------
Looks like this was broken in commit 67eef7e042e2da50cdd4e663c05eddc34219a580
We use methods in java.nio.file which throws a NoSuchFileException, but the
code only expects FileNotFoundException thrown by non-nio functions.
> CLI: Missing input file leads to NoSuchFileException
> ----------------------------------------------------
>
> Key: DAFFODIL-2944
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2944
> Project: Daffodil
> Issue Type: Bug
> Components: CLI
> Affects Versions: 3.9.0
> Reporter: Steve Lawrence
> Priority: Major
> Fix For: 4.0.0
>
>
> If you run the CLI like this in 3.9.0
> {code}
> daffodil parse -s foo.dfdl.xsd does_not_exist.input
> {code}
> You get the exception:
> {code}
> java.nio.file.NoSuchFileException: does_not_exist.input
> at
> java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
> at
> java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
> at
> java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
> at
> java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
> at
> java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
> at
> java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
> at java.base/java.nio.file.Files.readAttributes(Files.java:1853)
> at java.base/java.nio.file.Files.size(Files.java:2462)
> at org.apache.daffodil.cli.Main.runIgnoreExceptions(Main.scala:1176)
> at org.apache.daffodil.cli.Main.run(Main.scala:1964)
> at org.apache.daffodil.cli.Main$.main(Main.scala:878)
> at org.apache.daffodil.cli.Main.main(Main.scala)
> {code}
> In 3.8.0 this just better error message
> {code}
> [error] does_not_exist.input (No such file or directory)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)