1
0
forked from 0ad/0ad

Log XML errors to mainlog.html

This was SVN commit r355.
This commit is contained in:
Simon Brenner 2004-06-02 15:38:31 +00:00
parent 85f335e0fe
commit a2c508ff1a

View File

@ -12,6 +12,7 @@ gee@pyro.nu
#include <iostream> #include <iostream>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "Prometheus.h"
// Use namespace // Use namespace
XERCES_CPP_NAMESPACE_USE XERCES_CPP_NAMESPACE_USE
@ -35,7 +36,12 @@ void CXercesErrorHandler::error(const SAXParseException& toCatch)
<< ", column " << toCatch.getColumnNumber() << ", column " << toCatch.getColumnNumber()
<< "\n Message: " << StrX(toCatch.getMessage()) << endl; << "\n Message: " << StrX(toCatch.getMessage()) << endl;
*/ */
LOG(ERROR, "XML Parse Error: %s:%d:%d: %s",
XMLString::transcode(toCatch.getSystemId()),
toCatch.getLineNumber(),
toCatch.getColumnNumber(),
XMLString::transcode(toCatch.getMessage()));
/// g_nemLog(" Error: %s", XMLString::transcode(toCatch.getMessage())); /// g_nemLog(" Error: %s", XMLString::transcode(toCatch.getMessage()));
} }
@ -52,6 +58,11 @@ void CXercesErrorHandler::fatalError(const SAXParseException& toCatch)
<< ", column " << toCatch.getColumnNumber() << ", column " << toCatch.getColumnNumber()
<< "\n Message: " << StrX(toCatch.getMessage()) << endl; << "\n Message: " << StrX(toCatch.getMessage()) << endl;
*/ */
LOG(ERROR, "XML Parse Error: %s:%d:%d: %s",
XMLString::transcode(toCatch.getSystemId()),
toCatch.getLineNumber(),
toCatch.getColumnNumber(),
XMLString::transcode(toCatch.getMessage()));
/// g_nemLog(" Error: %s", XMLString::transcode(toCatch.getMessage())); /// g_nemLog(" Error: %s", XMLString::transcode(toCatch.getMessage()));
} }