The problem is that perhaps you have an error classified as a FatalError.
Standard errors can be handled with custom ErrorHandler. Fatal errors also can be handled, but the SAXException is thrown anyway and parsing is stopped.
See this in docs for Validator.validate: Validates the specified input. (...) Throws: (...) SAXException – If the ErrorHandler throws a SAXException or if a fatal error is found and the ErrorHandler returns normally.