public class JAXBErrorHandler
extends java.lang.Object
implements org.xml.sax.ErrorHandler
Implementation of org.xml.sax.ErrorHandler. When JAXBMarshaller or JAXBUnmarshaller is given a ValidationEventHandler a JAXBErrorHandler is used to wrap it. This ErrorHandler is then used by the underlying XMLMarshaller or XMLUnmarshaller.
| Constructor and Description |
|---|
JAXBErrorHandler(ValidationEventHandler validationEventHandler)
Create a new JAXBErrorHandler with the specified ValidationEventHandler
|
| Modifier and Type | Method and Description |
|---|---|
void |
error(org.xml.sax.SAXParseException exception)
Handle errors.
|
void |
fatalError(org.xml.sax.SAXParseException exception)
Handle fatal errors.
|
ValidationEventHandler |
getValidationEventHandler()
Return the ValidationEventHandler associated with this JAXBErrorHandler.
|
void |
warning(org.xml.sax.SAXParseException exception)
Handle warnings
The exception will be given to the ValidationEventHandler at to attempt to handle.
|
public JAXBErrorHandler(ValidationEventHandler validationEventHandler)
validationEventHandler - public void warning(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
warning in interface org.xml.sax.ErrorHandlerexception - the SAXParseException that occurredorg.xml.sax.SAXExceptionpublic void error(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlerexception - the SAXParseException that occurredorg.xml.sax.SAXExceptionpublic void fatalError(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerexception - the SAXParseException that occurredorg.xml.sax.SAXExceptionpublic ValidationEventHandler getValidationEventHandler()