mimas::xml_errorhandler Class Reference
[XML parser]

Error handler for interfacing with Xalan-library. More...

#include <xml_errorhandler.h>

Inheritance diagram for mimas::xml_errorhandler:

Inheritance graph
[legend]
Collaboration diagram for mimas::xml_errorhandler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 xml_errorhandler (void)
 Constructor.
void warning (const SAXParseException &toCatch)
 Call-back function for warnings.
void error (const SAXParseException &toCatch)
 Call-back function for errors.
void fatalError (const SAXParseException &toCatch)
 Call-back function for fatal errors.
void resetErrors (void)
 Clear error-information to reuse handler.
bool getErrorOccurred (void) const
 Get error-status.
const std::string & getErrorMessage (void) const
 Get error-messages.

Protected Member Functions

void triggerError (const std::string &type, const SAXParseException &toCatch)
 Change state and store error-description.
std::string createMessage (const std::string &type, const SAXParseException &toCatch)
 Extract textual description of error.

Protected Attributes

bool errorOccurred
 Boolean indicating, wether an error has occurred.
std::string message
 Message-buffer with textual description of errors.

Detailed Description

Error handler for interfacing with Xalan-library.

This class is for internal use only.

See also:
xml_document
Author:
Jan Wedekind (jan at wedesoft.de)
Date:
Wed Jan 12 13:53:41 UTC 2004

Definition at line 27 of file xml_errorhandler.h.


Constructor & Destructor Documentation

mimas::xml_errorhandler::xml_errorhandler ( void   ) 

Constructor.


Member Function Documentation

void mimas::xml_errorhandler::warning ( const SAXParseException &  toCatch  ) 

Call-back function for warnings.

Does nothing. In debug-mode information is printed to stderr.

Parameters:
toCatch Exception object.

void mimas::xml_errorhandler::error ( const SAXParseException &  toCatch  ) 

Call-back function for errors.

triggerError is called.

Parameters:
toCatch Exception object.

void mimas::xml_errorhandler::fatalError ( const SAXParseException &  toCatch  ) 

Call-back function for fatal errors.

triggerError is called.

Parameters:
toCatch Exception object.

void mimas::xml_errorhandler::resetErrors ( void   ) 

Clear error-information to reuse handler.

Clears the message-buffer and resets errorOccurred.

bool mimas::xml_errorhandler::getErrorOccurred ( void   )  const [inline]

Get error-status.

Returns:
true indicates an error has occurred.

Definition at line 49 of file xml_errorhandler.h.

References errorOccurred.

const std::string& mimas::xml_errorhandler::getErrorMessage ( void   )  const [inline]

Get error-messages.

Returns:
String containing the error-message(s).

Definition at line 52 of file xml_errorhandler.h.

References message.

void mimas::xml_errorhandler::triggerError ( const std::string &  type,
const SAXParseException &  toCatch 
) [protected]

Change state and store error-description.

errorOccurred is set to true and the description of the error is added to the message-buffer.

std::string mimas::xml_errorhandler::createMessage ( const std::string &  type,
const SAXParseException &  toCatch 
) [protected]

Extract textual description of error.

The information provided by the exception object is converted to a textual error-description.

Parameters:
type Type of error (f.e. "Error" or "Fatal error").
toCatch Exception object.


Member Data Documentation

bool mimas::xml_errorhandler::errorOccurred [protected]

Boolean indicating, wether an error has occurred.

Definition at line 67 of file xml_errorhandler.h.

Referenced by getErrorOccurred().

std::string mimas::xml_errorhandler::message [protected]

Message-buffer with textual description of errors.

Definition at line 69 of file xml_errorhandler.h.

Referenced by getErrorMessage().


The documentation for this class was generated from the following file:
[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:48 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...