summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/ConfigParserErrorReporter.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2002-09-05 16:51:42 +0000
committerMark Spruiell <mes@zeroc.com>2002-09-05 16:51:42 +0000
commit5bd935a2458aea5d92462057989eae8bb05eed61 (patch)
treefd27b23c9a470d794523b80f220ad367d5d94a42 /cpp/src/IceSSL/ConfigParserErrorReporter.cpp
parentXerces 2.1.0 does not accept scoped names in id attributes (diff)
downloadice-5bd935a2458aea5d92462057989eae8bb05eed61.tar.bz2
ice-5bd935a2458aea5d92462057989eae8bb05eed61.tar.xz
ice-5bd935a2458aea5d92462057989eae8bb05eed61.zip
Xerces 2.1.0 port
Diffstat (limited to 'cpp/src/IceSSL/ConfigParserErrorReporter.cpp')
-rw-r--r--cpp/src/IceSSL/ConfigParserErrorReporter.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/cpp/src/IceSSL/ConfigParserErrorReporter.cpp b/cpp/src/IceSSL/ConfigParserErrorReporter.cpp
index 21dcb82d9e0..a73284cdead 100644
--- a/cpp/src/IceSSL/ConfigParserErrorReporter.cpp
+++ b/cpp/src/IceSSL/ConfigParserErrorReporter.cpp
@@ -13,14 +13,23 @@
#include <IceSSL/OpenSSL.h>
#include <IceSSL/TraceLevels.h>
-#include <sax/SAXParseException.hpp>
+#include <xercesc/sax/SAXParseException.hpp>
#include <sstream>
using namespace std;
-void ::IceInternal::incRef(::IceSSL::ConfigParserErrorReporter* p) { p->__incRef(); }
-void ::IceInternal::decRef(::IceSSL::ConfigParserErrorReporter* p) { p->__decRef(); }
+//
+// Utility to make the usage of xerces easier.
+//
+static string
+toString(const XMLCh* s)
+{
+ char* t = XMLString::transcode(s);
+ string r(t);
+ delete[] t;
+ return r;
+}
IceSSL::ConfigParserErrorReporter::ConfigParserErrorReporter(const IceSSL::TraceLevelsPtr& traceLevels,
const Ice::LoggerPtr& logger) :
@@ -41,11 +50,11 @@ IceSSL::ConfigParserErrorReporter::warning(const SAXParseException& toCatch)
{
ostringstream s;
- s << "ssl configuration file parse error" << endl;
- s << DOMString(toCatch.getSystemId());
- s << ", line " << toCatch.getLineNumber();
- s << ", column " << toCatch.getColumnNumber() << endl;
- s << "Message " << DOMString(toCatch.getMessage()) << endl;
+ s << "ssl configuration file parse error" << endl
+ << toString(toCatch.getSystemId())
+ << ", line " << toCatch.getLineNumber()
+ << ", column " << toCatch.getColumnNumber() << endl
+ << "Message " << toString(toCatch.getMessage()) << endl;
_logger->trace(_traceLevels->securityCat, "PWN " + s.str());
}
@@ -56,11 +65,11 @@ IceSSL::ConfigParserErrorReporter::error(const SAXParseException& toCatch)
{
_errorCount++;
- _errors << "ssl configuration file parse error" << endl;
- _errors << " " << DOMString(toCatch.getSystemId());
- _errors << ", line " << toCatch.getLineNumber();
- _errors << ", column " << toCatch.getColumnNumber() << endl;
- _errors << " " << "Message " << DOMString(toCatch.getMessage()) << endl;
+ _errors << "ssl configuration file parse error" << endl
+ << " " << toString(toCatch.getSystemId())
+ << ", line " << toCatch.getLineNumber()
+ << ", column " << toCatch.getColumnNumber() << endl
+ << " " << "Message " << toString(toCatch.getMessage()) << endl;
}
void
@@ -68,11 +77,11 @@ IceSSL::ConfigParserErrorReporter::fatalError(const SAXParseException& toCatch)
{
_errorCount++;
- _errors << "ssl configuration file parse error" << endl;
- _errors << " " << DOMString(toCatch.getSystemId());
- _errors << ", line " << toCatch.getLineNumber();
- _errors << ", column " << toCatch.getColumnNumber() << endl;
- _errors << " " << "Message " << DOMString(toCatch.getMessage()) << endl;
+ _errors << "ssl configuration file parse error" << endl
+ << " " << toString(toCatch.getSystemId())
+ << ", line " << toCatch.getLineNumber()
+ << ", column " << toCatch.getColumnNumber() << endl
+ << " " << "Message " << toString(toCatch.getMessage()) << endl;
}
void
@@ -92,12 +101,3 @@ IceSSL::ConfigParserErrorReporter::getErrors() const
{
return _errors.str();
}
-
-std::ostream&
-IceSSL::operator << (std::ostream& target, const DOMString& s)
-{
- char *p = s.transcode();
- target << p;
- delete [] p;
- return target;
-}