ome-common
5.5.0
|
Xerces error handler reporting errors to an ostream. More...
#include <ome/common/xml/ErrorReporter.h>
Public Member Functions | |
ErrorReporter (std::ostream &stream=std::cerr) | |
Construct an ErrorReporter. More... | |
~ErrorReporter () | |
The destructor. | |
void | warning (const xercesc::SAXParseException &toCatch) |
Log a warning. More... | |
void | error (const xercesc::SAXParseException &toCatch) |
Log an error. More... | |
void | fatalError (const xercesc::SAXParseException &toCatch) |
Log a fatal error. More... | |
void | resetErrors () |
Reset error status. More... | |
operator bool () const | |
Has an error been encountered? More... | |
Private Attributes | |
std::ostream & | stream |
The output stream to use. | |
bool | saw_error |
Has an error been encountered? | |
Xerces error handler reporting errors to an ostream.
Encountered Xerces xercesc::SAXParseException exceptions are logged to the specified ostream. Xerces exceptions don't derive from any of the standard exception classes, and don't use standard strings, making them difficult to catch and process. If an error is encountered, this class will evaluate to true.
ome::common::xml::ErrorReporter::ErrorReporter | ( | std::ostream & | stream = std::cerr | ) |
Construct an ErrorReporter.
stream | the stream to output exception details to. |
void ome::common::xml::ErrorReporter::error | ( | const xercesc::SAXParseException & | toCatch | ) |
void ome::common::xml::ErrorReporter::fatalError | ( | const xercesc::SAXParseException & | toCatch | ) |
|
inline |
Has an error been encountered?
References saw_error.
void ome::common::xml::ErrorReporter::resetErrors | ( | ) |
Reset error status.
Forget any errors which have been previously encountered. The class will subsequently evaluate to true.
References saw_error.
void ome::common::xml::ErrorReporter::warning | ( | const xercesc::SAXParseException & | toCatch | ) |