Class XMLErrorHandler

java.lang.Object
gov.nih.mipav.view.dialogs.XMLErrorHandler
All Implemented Interfaces:
ErrorHandler

class XMLErrorHandler extends Object implements 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 Details

    • XMLErrorHandler

      XMLErrorHandler()
  • Method Details

    • error

      public void error(SAXParseException spe) throws SAXException
      Handles parse exception errors by passing the parse exception up as a SAXException.
      Specified by:
      error in interface ErrorHandler
      Parameters:
      spe - the parse exception
      Throws:
      SAXException - passed up with the parse exception info
    • fatalError

      public void fatalError(SAXParseException spe) throws SAXException
      Handles parse exception fatal errors by passing the parse exception up as a SAXException.
      Specified by:
      fatalError in interface ErrorHandler
      Parameters:
      spe - the parse exception
      Throws:
      SAXException - passed up with the parse exception info
    • warning

      public void warning(SAXParseException spe) throws SAXException
      Handles parse exception warnings by outputting them to the debug window.
      Specified by:
      warning in interface ErrorHandler
      Parameters:
      spe - the parse exception
      Throws:
      SAXException - not reported for warnings
    • getParseExceptionInfo

      private String getParseExceptionInfo(SAXParseException spe)
      Returns a string describing parse exception details.
      Parameters:
      spe - the parse exception
      Returns:
      a string containing information about the exception