Package gov.nih.mipav.model.file
Class XMLErrorHandler
java.lang.Object
gov.nih.mipav.model.file.XMLErrorHandler
- All Implemented Interfaces:
ErrorHandler
Error handler to report errors and warnings from the XML parser. Implements standard SAX ErrorHandler methods, see
SAX docs for more info.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiderror(SAXParseException spe) Handles parse exception errors by passing the parse exception up as a SAXException.voidHandles parse exception fatal errors by passing the parse exception up as a SAXException.private StringReturns a string describing parse exception details.voidwarning(SAXParseException spe) Handles parse exception warnings by outputting them to the debug window.
-
Constructor Details
-
XMLErrorHandler
public XMLErrorHandler()
-
-
Method Details
-
error
Handles parse exception errors by passing the parse exception up as a SAXException.- Specified by:
errorin interfaceErrorHandler- Parameters:
spe- the parse exception- Throws:
SAXException- passed up with the parse exception info
-
fatalError
Handles parse exception fatal errors by passing the parse exception up as a SAXException.- Specified by:
fatalErrorin interfaceErrorHandler- Parameters:
spe- the parse exception- Throws:
SAXException- passed up with the parse exception info
-
warning
Handles parse exception warnings by outputting them to the debug window.- Specified by:
warningin interfaceErrorHandler- Parameters:
spe- the parse exception- Throws:
SAXException- not reported for warnings
-
getParseExceptionInfo
Returns a string describing parse exception details.- Parameters:
spe- the parse exception- Returns:
- a string containing information about the exception
-