Package org.eclipse.persistence.jaxb
Class JAXBErrorHandler
- java.lang.Object
-
- org.eclipse.persistence.jaxb.JAXBErrorHandler
-
- All Implemented Interfaces:
ErrorHandler
public class JAXBErrorHandler extends Object implements 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 Summary
Constructors Constructor Description JAXBErrorHandler(jakarta.xml.bind.ValidationEventHandler validationEventHandler)Create a new JAXBErrorHandler with the specified ValidationEventHandler
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(SAXParseException exception)Handle errors.voidfatalError(SAXParseException exception)Handle fatal errors.jakarta.xml.bind.ValidationEventHandlergetValidationEventHandler()Return the ValidationEventHandler associated with this JAXBErrorHandler.voidwarning(SAXParseException exception)Handle warnings The exception will be given to the ValidationEventHandler at to attempt to handle.
-
-
-
Method Detail
-
warning
public void warning(SAXParseException exception) throws SAXException
Handle warnings The exception will be given to the ValidationEventHandler at to attempt to handle.- Specified by:
warningin interfaceErrorHandler- Parameters:
exception- the SAXParseException that occurred- Throws:
SAXException
-
error
public void error(SAXParseException exception) throws SAXException
Handle errors. The exception will be given to the ValidationEventHandler at to attempt to handle.- Specified by:
errorin interfaceErrorHandler- Parameters:
exception- the SAXParseException that occurred- Throws:
SAXException
-
fatalError
public void fatalError(SAXParseException exception) throws SAXException
Handle fatal errors. The exception will be given to the ValidationEventHandler at to attempt to handle.- Specified by:
fatalErrorin interfaceErrorHandler- Parameters:
exception- the SAXParseException that occurred- Throws:
SAXException
-
getValidationEventHandler
public jakarta.xml.bind.ValidationEventHandler getValidationEventHandler()
Return the ValidationEventHandler associated with this JAXBErrorHandler.- Returns:
- the ValidationEventHandler associated with this JAXBErrorHandler.
-
-