-
Bug
-
Resolution: Fixed
-
Major
-
s7
-
None
-
None
When running the parse command, if you specify a root element that is not found within the file, an exception is printed to the commandline:
~/NGF/dfdl (master) echo "12" | ./daffodil-core/target/start parse -s daffodil-test/src/test/resources/daffodil/section06/entities/charClassEntities.dfdl.xsd -r unknown
2013-01-31 06:23:38:512 daffodil.compiler.Compiler Error [Compilation (ProcessorFactory) produced 1 errors/warnings.]
2013-01-31 06:23:38:516 daffodil.compiler.Compiler Error [Schema Definition Error: No root element found for unknown in any available namespace Schema context: SchemaSet. Location in file:SchemaSet]
Exception in thread "main" daffodil.exceptions.Abort: Usage error.
daffodil.exceptions.Assert$.abort(Assert.scala:52)
daffodil.exceptions.Assert$.usageErrorUnless(Assert.scala:36)
daffodil.exceptions.Assert$.usage(Assert.scala:27)
daffodil.compiler.ProcessorFactory.onPath(Compiler.scala:53)
at daffodil.exceptions.Assert$.abort(Assert.scala:52)
at daffodil.exceptions.Assert$.usageErrorUnless(Assert.scala:36)
at daffodil.exceptions.Assert$.usage(Assert.scala:27)
at daffodil.compiler.ProcessorFactory.onPath(Compiler.scala:53)
at daffodil.Main$.createProcessorFromSchemas(Main.scala:92)
at daffodil.Main$.main(Main.scala:271)
at daffodil.Main.main(Main.scala)
It might be better for this exception to be handled and presented to the user in a way that displays the issue more clearly. It is possible that there are other errors like this, and I will add to the ticket if I come across them.
main CLI ticket: DFDL-409