net.ontopia.xml
Class Slf4jSaxErrorHandler
java.lang.Object
net.ontopia.xml.Slf4jSaxErrorHandler
- All Implemented Interfaces:
- ErrorHandler
public class Slf4jSaxErrorHandler
- extends Object
- implements ErrorHandler
INTERNAL: SAX2 error handler implementation that uses slf4j to log
warnings, errors and fatal errors.
Note: You can set the default for ignoring namespace related error
messages by setting the boolean system property
'net.ontopia.xml.Slf4jSaxErrorHandler.ignoreNamespaceErrors'. The
default can later be overriden by calling the
setIgnoreNamespaceError(boolean) method. The system property only
has effect when the instance is being creates.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected org.slf4j.Logger log
ignoreNamespaceErrors
protected boolean ignoreNamespaceErrors
Slf4jSaxErrorHandler
public Slf4jSaxErrorHandler(org.slf4j.Logger log)
setIgnoreNamespaceError
public void setIgnoreNamespaceError(boolean ignore)
- INTERNAL: Sets error logging strategy when namespace is not
declared.
getExceptionLocationInfo
protected String getExceptionLocationInfo(SAXParseException e)
warning
public void warning(SAXParseException e)
- Specified by:
warning
in interface ErrorHandler
error
public void error(SAXParseException e)
- Specified by:
error
in interface ErrorHandler
fatalError
public void fatalError(SAXParseException e)
throws SAXParseException
- Specified by:
fatalError
in interface ErrorHandler
- Throws:
SAXParseException
Copyright © 2000-2012 Ontopia.