diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-04-24 21:13:00 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-04-24 21:13:00 +0000 |
commit | 5409c1ecef0f226dedc77721c0d2fc8dfe9e85de (patch) | |
tree | 97ba75bc47a143726d6d8382be3a462e51716700 /cpp/src/Ice/ConfigParserErrorReporter.cpp | |
parent | cleaning up sample impls (diff) | |
download | ice-5409c1ecef0f226dedc77721c0d2fc8dfe9e85de.tar.bz2 ice-5409c1ecef0f226dedc77721c0d2fc8dfe9e85de.tar.xz ice-5409c1ecef0f226dedc77721c0d2fc8dfe9e85de.zip |
merging from plugins branch
Diffstat (limited to 'cpp/src/Ice/ConfigParserErrorReporter.cpp')
-rw-r--r-- | cpp/src/Ice/ConfigParserErrorReporter.cpp | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/cpp/src/Ice/ConfigParserErrorReporter.cpp b/cpp/src/Ice/ConfigParserErrorReporter.cpp deleted file mode 100644 index 44992289608..00000000000 --- a/cpp/src/Ice/ConfigParserErrorReporter.cpp +++ /dev/null @@ -1,105 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2001 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#include <iostream> -#include <sstream> - -#include <sax/SAXParseException.hpp> -#include <Ice/ConfigParserErrorReporter.h> -#include <stdlib.h> -#include <string.h> -#include <Ice/TraceLevels.h> -#include <Ice/Logger.h> -#include <Ice/OpenSSL.h> - -using namespace std; - -void ::IceInternal::incRef(::IceSSL::ConfigParserErrorReporter* p) { p->__incRef(); } -void ::IceInternal::decRef(::IceSSL::ConfigParserErrorReporter* p) { p->__decRef(); } - -IceSSL::ConfigParserErrorReporter::ConfigParserErrorReporter(const IceInternal::TraceLevelsPtr& traceLevels, - const Ice::LoggerPtr& logger) : - _traceLevels(traceLevels), - _logger(logger) -{ - _errorCount = 0; -} - -IceSSL::ConfigParserErrorReporter::~ConfigParserErrorReporter() -{ -} - -void -IceSSL::ConfigParserErrorReporter::warning(const SAXParseException& toCatch) -{ - if (_traceLevels->security >= IceSSL::SECURITY_PARSE_WARNINGS) - { - 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; - - _logger->trace(_traceLevels->securityCat, "PWN " + s.str()); - } -} - -void -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; -} - -void -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; -} - -void -IceSSL::ConfigParserErrorReporter::resetErrors() -{ - // No-op in this case -} - -bool -IceSSL::ConfigParserErrorReporter::getSawErrors() const -{ - return (_errorCount == 0 ? false : true); -} - -string -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; -} |