public void fatalError(SAXParseException exception) throws SAXException {
handleException(exception, ValidationEvent.FATAL_ERROR);
}
private void handleException(SAXParseException exception, int severity) throws SAXException {
ValidationEventLocatorImpl eventLocator = new ValidationEventLocatorImpl(exception);
if(exception instanceof MarshalSAXParseException) {
eventLocator.setObject(((MarshalSAXParseException) exception).getObject());
}
ValidationEvent event = new ValidationEventImpl(severity, exception.getLocalizedMessage(), eventLocator, exception);
if (!eventHandler.handleEvent(event)) {
throw exception;
}