Package gov.nih.mipav.model.file
Class XMLErrorHandler
- java.lang.Object
-
- gov.nih.mipav.model.file.XMLErrorHandler
-
- All Implemented Interfaces:
org.xml.sax.ErrorHandler
public class XMLErrorHandler extends java.lang.Object implements org.xml.sax.ErrorHandlerError handler to report errors and warnings from the XML parser. Implements standard SAX ErrorHandler methods, see SAX docs for more info.
-
-
Constructor Summary
Constructors Constructor Description XMLErrorHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(org.xml.sax.SAXParseException spe)Handles parse exception errors by passing the parse exception up as a SAXException.voidfatalError(org.xml.sax.SAXParseException spe)Handles parse exception fatal errors by passing the parse exception up as a SAXException.private java.lang.StringgetParseExceptionInfo(org.xml.sax.SAXParseException spe)Returns a string describing parse exception details.voidwarning(org.xml.sax.SAXParseException spe)Handles parse exception warnings by outputting them to the debug window.
-
-
-
Method Detail
-
error
public void error(org.xml.sax.SAXParseException spe) throws org.xml.sax.SAXExceptionHandles parse exception errors by passing the parse exception up as a SAXException.- Specified by:
errorin interfaceorg.xml.sax.ErrorHandler- Parameters:
spe- the parse exception- Throws:
org.xml.sax.SAXException- passed up with the parse exception info
-
fatalError
public void fatalError(org.xml.sax.SAXParseException spe) throws org.xml.sax.SAXExceptionHandles parse exception fatal errors by passing the parse exception up as a SAXException.- Specified by:
fatalErrorin interfaceorg.xml.sax.ErrorHandler- Parameters:
spe- the parse exception- Throws:
org.xml.sax.SAXException- passed up with the parse exception info
-
warning
public void warning(org.xml.sax.SAXParseException spe) throws org.xml.sax.SAXExceptionHandles parse exception warnings by outputting them to the debug window.- Specified by:
warningin interfaceorg.xml.sax.ErrorHandler- Parameters:
spe- the parse exception- Throws:
org.xml.sax.SAXException- not reported for warnings
-
getParseExceptionInfo
private java.lang.String getParseExceptionInfo(org.xml.sax.SAXParseException spe)
Returns a string describing parse exception details.- Parameters:
spe- the parse exception- Returns:
- a string containing information about the exception
-
-