Package gov.nih.mipav.view.dialogs
Class XMLErrorHandler
- java.lang.Object
-
- gov.nih.mipav.view.dialogs.XMLErrorHandler
-
- All Implemented Interfaces:
org.xml.sax.ErrorHandler
class XMLErrorHandler extends java.lang.Object implements org.xml.sax.ErrorHandler
Error 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 void
error(org.xml.sax.SAXParseException spe)
Handles parse exception errors by passing the parse exception up as a SAXException.void
fatalError(org.xml.sax.SAXParseException spe)
Handles parse exception fatal errors by passing the parse exception up as a SAXException.private java.lang.String
getParseExceptionInfo(org.xml.sax.SAXParseException spe)
Returns a string describing parse exception details.void
warning(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.SAXException
Handles parse exception errors by passing the parse exception up as a SAXException.- Specified by:
error
in 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.SAXException
Handles parse exception fatal errors by passing the parse exception up as a SAXException.- Specified by:
fatalError
in 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.SAXException
Handles parse exception warnings by outputting them to the debug window.- Specified by:
warning
in 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
-
-