com.g11ntoolkit.parser.xml
Class LTSAXErrorHandler

java.lang.Object
  |
  +--com.g11ntoolkit.parser.xml.LTSAXErrorHandler
All Implemented Interfaces:
org.xml.sax.ErrorHandler

public class LTSAXErrorHandler
extends java.lang.Object
implements org.xml.sax.ErrorHandler

Implements the SAX Parser error handler.

Version:
2005/06/20
Author:
Bill Rich, Wilandra Consulting LLC
Copyright © 2001-2005, Wilandra Consulting LLC. All rights reserved.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See License Agreement.


Field Summary
private static java.util.logging.Logger log
          The log used for all messages from this class.
 
Constructor Summary
LTSAXErrorHandler()
          Default constructor.
 
Method Summary
 void error(org.xml.sax.SAXParseException ex)
          Displays an Error exception message.
 void fatalError(org.xml.sax.SAXParseException ex)
          Displays a Fatal exception message on standard out then passes it on as a SAXException.
private  java.lang.String getLocationString(org.xml.sax.SAXParseException ex)
          Returns a string containing the location of the exception.
 void warning(org.xml.sax.SAXParseException ex)
          Displays a Warning exception message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static java.util.logging.Logger log
The log used for all messages from this class.

Constructor Detail

LTSAXErrorHandler

public LTSAXErrorHandler()
Default constructor.

Method Detail

warning

public void warning(org.xml.sax.SAXParseException ex)
Displays a Warning exception message.

Displays the exception message on standard out with the word Warning in front of it.

Specified by:
warning in interface org.xml.sax.ErrorHandler
Parameters:
ex - a SAXParseException

error

public void error(org.xml.sax.SAXParseException ex)
Displays an Error exception message.

Displays the exception message on standard out with the word Error in front of it.

Specified by:
error in interface org.xml.sax.ErrorHandler
Parameters:
ex - a SAXParseException

fatalError

public void fatalError(org.xml.sax.SAXParseException ex)
                throws org.xml.sax.SAXException
Displays a Fatal exception message on standard out then passes it on as a SAXException.

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Parameters:
ex - a SAXParseException
Throws:
org.xml.sax.SAXException

getLocationString

private java.lang.String getLocationString(org.xml.sax.SAXParseException ex)
Returns a string containing the location of the exception.

Parameters:
ex - a SAXParseException
Returns:
a String containing the location of the error.