Package com.tangosol.run.xml
Class SaxParser.ValidationHandler
java.lang.Object
com.tangosol.run.xml.SaxParser.ValidationHandler
- All Implemented Interfaces:
ErrorHandler
- Enclosing class:
SaxParser
An inner class Error Handler that is registered in
parser that performs validation. It gets called when
on warning, error, or fatalError.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Routine called when a error occurs in parser.void
Routine called when a fatal error occurs in parser.int
Returns the number of Errors encountered.Returns a saved parser exception.boolean
isError()
Returns boolean indicating if an error has occurred.void
Routine called when a warning occurs in parser.
-
Constructor Details
-
ValidationHandler
protected ValidationHandler()
-
-
Method Details
-
warning
Routine called when a warning occurs in parser. Logs the warning message.- Specified by:
warning
in interfaceErrorHandler
- Parameters:
e
- SAXParseException is warning exception.- Throws:
SAXException
-
error
Routine called when a error occurs in parser. Logs the error message, saves the first exception and increments an errorCounter. Error count and exception can be retrieved when parsing is complete.- Specified by:
error
in interfaceErrorHandler
- Parameters:
e
- SAXParseException is error exception.- Throws:
SAXException
-
fatalError
Routine called when a fatal error occurs in parser. Logs the fatal error message and throws the exception.- Specified by:
fatalError
in interfaceErrorHandler
- Parameters:
e
- SAXParseException is fatal error exception.- Throws:
SAXException
- if SAX error occurs
-
getErrorCount
public int getErrorCount()Returns the number of Errors encountered.- Returns:
- int error count
-
getException
Returns a saved parser exception.- Returns:
- SAXParseException Parser exception
-
isError
public boolean isError()Returns boolean indicating if an error has occurred.- Returns:
- boolean true if error else false
-