org.freehep.xml.util
Class SAXErrorHandler
java.lang.Object
org.freehep.xml.util.SAXErrorHandler
- All Implemented Interfaces:
- ErrorHandler
public class SAXErrorHandler
- extends Object
- implements ErrorHandler
A simple SAXErrorHandler. Reports errors to System.err and keeps track
of the most severe error. Can be configured to throw exceptions when errors
more severe than a certain LEVEL are encountered
- Version:
- $Id: SAXErrorHandler.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- tonyj
Constructor Summary |
SAXErrorHandler()
Create a SAXErrorHandler which will throw exceptions for all errors (but not warnings) |
SAXErrorHandler(int minLevelForException)
Create a SAXErrorHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LEVEL_SUCCESS
public static final int LEVEL_SUCCESS
- See Also:
- Constant Field Values
LEVEL_WARNING
public static final int LEVEL_WARNING
- See Also:
- Constant Field Values
LEVEL_ERROR
public static final int LEVEL_ERROR
- See Also:
- Constant Field Values
LEVEL_FATAL
public static final int LEVEL_FATAL
- See Also:
- Constant Field Values
SAXErrorHandler
public SAXErrorHandler()
- Create a SAXErrorHandler which will throw exceptions for all errors (but not warnings)
SAXErrorHandler
public SAXErrorHandler(int minLevelForException)
- Create a SAXErrorHandler
- Parameters:
minLevelForException
- The minimum error level for which exceptions will be thrown
warning
public void warning(SAXParseException exception)
throws SAXException
- Specified by:
warning
in interface ErrorHandler
- Throws:
SAXException
error
public void error(SAXParseException exception)
throws SAXException
- Specified by:
error
in interface ErrorHandler
- Throws:
SAXException
fatalError
public void fatalError(SAXParseException exception)
throws SAXException
- Specified by:
fatalError
in interface ErrorHandler
- Throws:
SAXException
getErrorLevel
public int getErrorLevel()
- Get the level of the most severe error.
- Returns:
- one of LEVEL_SUCCESS, LEVEL_WARNING, LEVEL_ERROR, LEVEL_FATAL
Copyright © 2000-2007 FreeHEP. All Rights Reserved.