#include <xml_errorhandler.h>
Inheritance diagram for mimas::xml_errorhandler:


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. | |
This class is for internal use only.
Definition at line 27 of file xml_errorhandler.h.
| mimas::xml_errorhandler::xml_errorhandler | ( | void | ) |
Constructor.
| void mimas::xml_errorhandler::warning | ( | const SAXParseException & | toCatch | ) |
Call-back function for warnings.
Does nothing. In debug-mode information is printed to stderr.
| toCatch | Exception object. |
| void mimas::xml_errorhandler::error | ( | const SAXParseException & | toCatch | ) |
Call-back function for errors.
triggerError is called.
| toCatch | Exception object. |
| void mimas::xml_errorhandler::fatalError | ( | const SAXParseException & | toCatch | ) |
Call-back function for fatal errors.
triggerError is called.
| 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.
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.
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.
| type | Type of error (f.e. "Error" or "Fatal error"). | |
| toCatch | Exception object. |
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().