Package 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
ignoreNamespaceErrors
protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description Slf4jSaxErrorHandler(org.slf4j.Logger log)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
error(SAXParseException e)
void
fatalError(SAXParseException e)
protected String
getExceptionLocationInfo(SAXParseException e)
void
setIgnoreNamespaceError(boolean ignore)
INTERNAL: Sets error logging strategy when namespace is not declared.void
warning(SAXParseException e)
-
-
-
Method Detail
-
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 interfaceErrorHandler
-
error
public void error(SAXParseException e)
- Specified by:
error
in interfaceErrorHandler
-
fatalError
public void fatalError(SAXParseException e) throws SAXParseException
- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXParseException
-
-