org.objectweb.jorm.xml2mi.api

Class ParserErrorHandler


public class ParserErrorHandler
extends DefaultHandler

The ParserErrorHandler object extends the DefaultHandler from sax. This object is given to the DOM parser to handle potential errors.

Author:
X. Spengler

Constructor Summary

ParserErrorHandler()
Builds a new ParserErrorHandler for the DOM parser.

Method Summary

void
error(SAXParseException e)
Adds a new exception to the current vector of exceptions.
Vector
getErrors()
Returns the vector of errors.
void
initialize()
Resets the vector of errors.
int
numErrors()
Allows to know the number of handled errors.
void
warning(SAXParseException e)
Adds a new exception to the current vector of exceptions.

Constructor Details

ParserErrorHandler

public ParserErrorHandler()
Builds a new ParserErrorHandler for the DOM parser.

Method Details

error

public void error(SAXParseException e)
            throws SAXException
Adds a new exception to the current vector of exceptions.

Parameters:
e - a new SAXParseException to register


getErrors

public Vector getErrors()
Returns the vector of errors.

Returns:
the current vector of errors


initialize

public void initialize()
Resets the vector of errors.


numErrors

public int numErrors()
Allows to know the number of handled errors.

Returns:
the current number of errors


warning

public void warning(SAXParseException e)
            throws SAXException
Adds a new exception to the current vector of exceptions.

Parameters:
e - a new SAXParseException to register