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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRoutine called when a error occurs in parser.voidRoutine called when a fatal error occurs in parser.intReturns the number of Errors encountered.Returns a saved parser exception.booleanisError()Returns boolean indicating if an error has occurred.voidRoutine 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:
warningin 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:
errorin 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:
fatalErrorin 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
-