0ad/source/gui/XercesErrorHandler.cpp
janwas 5cc814759f Initial revision
This was SVN commit r9.
2003-11-03 16:22:45 +00:00

53 lines
1.3 KiB
C++
Executable File

/*
Xerces Error Handler for Prometheus (and the GUI)
by Gustav Larsson
gee@pyro.nu
*/
///#include "nemesis.h"
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/sax/SAXParseException.hpp>
#include "XercesErrorHandler.h"
#include <iostream>
#include <stdlib.h>
#include <string.h>
void XercesErrorHandler::warning(const SAXParseException&)
{
//
// Ignore all warnings.
//
}
void XercesErrorHandler::error(const SAXParseException& toCatch)
{
fSawErrors = true;
/* cerr << "Error at file \"" << StrX(toCatch.getSystemId())
<< "\", line " << toCatch.getLineNumber()
<< ", column " << toCatch.getColumnNumber()
<< "\n Message: " << StrX(toCatch.getMessage()) << endl;
*/
/// g_nemLog(" Error: %s", XMLString::transcode(toCatch.getMessage()));
}
void XercesErrorHandler::fatalError(const SAXParseException& toCatch)
{
fSawErrors = true;
/* cerr << "Fatal Error at file \"" << StrX(toCatch.getSystemId())
<< "\", line " << toCatch.getLineNumber()
<< ", column " << toCatch.getColumnNumber()
<< "\n Message: " << StrX(toCatch.getMessage()) << endl;
*/
/// g_nemLog(" Error: %s", XMLString::transcode(toCatch.getMessage()));
}
void XercesErrorHandler::resetErrors()
{
fSawErrors = false;
}