Closed Xaratas closed 9 years ago
Yeah, that's a bug. I seem to have done it in one place and not others. I'll try to get to this soon, but I'm snowed under at the minute :(
BTW, what was your logic regarding which error code to use? 1 is failed validation and 2 is a file error?
So I thought. For my case i yust needed something >0.
One more the last catch should be:
} catch (SAXException sch) {
System.err.println("Error reading XML Schema: " + sch.getMessage());
System.exit(2);
}
Finally merged this. Apologies for taking so long.
Oh, i saw you have not catched the error message change of my last comment. But thats the interesting part, why its not valid. ;)
Sorry, fixed now.
xsd-validator/src/xsdvalidator/validate.java
To use this nice wrapper in a pre-commit hook for git the errorcodes in the inner try need to have a non zero exit code: