Project

Profile

Help

SaxonCS validate with mistyped option (e.g. -xs) gives NullReferenceException

Added by Martin Honnen over 2 years ago

I have tried the validate option of SaxonCS from the command line, mistyping the -xsd option as -xs, that didn't give a clean error or warning (as the Java version of 10 EE does) but a NullReferenceException:

PS C:\Users\marti\OneDrive\Documents\XML\so20211026> & 'C:\Program Files\Saxonica\SaxonCS-11.0\SaxonCS.exe' validate -xs:assert-example1.xsd -s:sample1.xml
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at Saxon.Eej.Validate.quit(String message, Int32 code) in C:\Users\ndw\saxondev\build\cs\Saxon\Eej\Validate.cs:line 301
   at Saxon.Eej.Validate.doValidate(String[] args) in C:\Users\ndw\saxondev\build\cs\Saxon\Eej\Validate.cs:line 63
   at Saxon.Eej.Validate.main(String[] args) in C:\Users\ndw\saxondev\build\cs\Saxon\Eej\Validate.cs:line 17
   at Saxon.Cmd.Command.Main(String[] args) in C:\Users\ndw\saxondev\src\main\saxon-cs\engine\Saxon\Cmd\Command.cs:line 22


    (1-1/1)

    Please register to reply