te::xerces::ErrorHandler Class Reference

This class implements Xerces interface for error handlers. More...

#include <ErrorHandler.h>

Inheritance diagram for te::xerces::ErrorHandler:

Public Member Functions

void error (const xercesc::SAXParseException &exc)
 It receives from the parser a notification of a recoverable error. More...
 
 ErrorHandler ()
 Default constructor. More...
 
void fatalError (const xercesc::SAXParseException &exc)
 It receives from the parser a notification of a non-recoverable error. More...
 
const std::string & getError (std::size_t i) const
 It returns the n-th error message. More...
 
const std::string getErrors () const
 It returns a concatenation of all reported error messages. More...
 
const std::size_t getNumErros () const
 It returns the number of reported errors. More...
 
void resetErrors ()
 
void warning (const xercesc::SAXParseException &exc)
 It receives from the parser a notification of a warning. More...
 
 ~ErrorHandler ()
 Destructor. More...
 

Protected Attributes

std::vector< std::string > m_errors
 The error messages. More...
 

Detailed Description

This class implements Xerces interface for error handlers.

See also
Reader, ReaderHandler

Definition at line 50 of file ErrorHandler.h.

Constructor & Destructor Documentation

te::xerces::ErrorHandler::ErrorHandler ( )
inline

Default constructor.

Definition at line 55 of file ErrorHandler.h.

te::xerces::ErrorHandler::~ErrorHandler ( )
inline

Destructor.

Definition at line 58 of file ErrorHandler.h.

References error(), fatalError(), getError(), getErrors(), getNumErros(), resetErrors(), and warning().

Member Function Documentation

void te::xerces::ErrorHandler::error ( const xercesc::SAXParseException &  exc)

It receives from the parser a notification of a recoverable error.

Parameters
excThe error information.

Definition at line 38 of file ErrorHandler.cpp.

References m_errors, and te::xerces::ToString().

Referenced by ~ErrorHandler().

void te::xerces::ErrorHandler::fatalError ( const xercesc::SAXParseException &  exc)

It receives from the parser a notification of a non-recoverable error.

Parameters
excThe error information.

Definition at line 43 of file ErrorHandler.cpp.

References m_errors, and te::xerces::ToString().

Referenced by ~ErrorHandler().

const std::string & te::xerces::ErrorHandler::getError ( std::size_t  i) const

It returns the n-th error message.

Parameters
iThe error message position in the internal conteiner.
Returns
The n-th error message.
Note
This method doesn't check the index range.

Definition at line 58 of file ErrorHandler.cpp.

References m_errors.

Referenced by ~ErrorHandler().

const std::string te::xerces::ErrorHandler::getErrors ( ) const

It returns a concatenation of all reported error messages.

Returns
A concatenation of all reported error messages.

Definition at line 63 of file ErrorHandler.cpp.

References m_errors.

Referenced by te::xerces::Reader::next(), te::xerces::Reader::read(), and ~ErrorHandler().

const std::size_t te::xerces::ErrorHandler::getNumErros ( ) const

It returns the number of reported errors.

Returns
The number of reported errors.

Definition at line 53 of file ErrorHandler.cpp.

References m_errors.

Referenced by ~ErrorHandler().

void te::xerces::ErrorHandler::resetErrors ( )

brief It resets the error handler object on its reuse.

Definition at line 48 of file ErrorHandler.cpp.

References m_errors.

Referenced by ~ErrorHandler().

void te::xerces::ErrorHandler::warning ( const xercesc::SAXParseException &  exc)

It receives from the parser a notification of a warning.

Parameters
excThe warning information.

Definition at line 33 of file ErrorHandler.cpp.

References m_errors, and te::xerces::ToString().

Referenced by ~ErrorHandler().

Member Data Documentation

std::vector<std::string> te::xerces::ErrorHandler::m_errors
protected

The error messages.

Definition at line 111 of file ErrorHandler.h.

Referenced by error(), fatalError(), getError(), getErrors(), getNumErros(), resetErrors(), and warning().


The documentation for this class was generated from the following files: