summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-01-24 23:10:20 +0000
committerAlan Conway <aconway@apache.org>2008-01-24 23:10:20 +0000
commitef7be26a17761ae2b86ee300b763c3954f9e3cb0 (patch)
tree90ac18b099c1079c413823246e4437b6c2778fbc
parentfea3cc47905d9d264bb2aa1dddcf098079aee946 (diff)
downloadqpid-python-ef7be26a17761ae2b86ee300b763c3954f9e3cb0.tar.gz
Fixed re-entry problem with exceptions throw in logger code.
- src/qpid/log/Logger.cpp - src/qpid/log/Statement.cpp git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@615075 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/log/Logger.cpp3
-rw-r--r--qpid/cpp/src/qpid/log/Statement.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/log/Logger.cpp b/qpid/cpp/src/qpid/log/Logger.cpp
index de3f8f5bee..b51bb0427b 100644
--- a/qpid/cpp/src/qpid/log/Logger.cpp
+++ b/qpid/cpp/src/qpid/log/Logger.cpp
@@ -29,6 +29,7 @@
#include <sstream>
#include <fstream>
#include <iomanip>
+#include <stdexcept>
#include <syslog.h>
@@ -50,7 +51,7 @@ struct OstreamOutput : public Logger::Output {
: out(new ofstream(file.c_str())), mine(out)
{
if (!out->good())
- throw Exception("Can't open log file: "+file);
+ throw std::runtime_error("Can't open log file: "+file);
}
void log(const Statement&, const std::string& m) {
diff --git a/qpid/cpp/src/qpid/log/Statement.cpp b/qpid/cpp/src/qpid/log/Statement.cpp
index de130bc455..949927a32b 100644
--- a/qpid/cpp/src/qpid/log/Statement.cpp
+++ b/qpid/cpp/src/qpid/log/Statement.cpp
@@ -18,7 +18,7 @@
#include "Statement.h"
#include "Logger.h"
-#include "qpid/Exception.h"
+#include <stdexcept>
#include <syslog.h>
namespace qpid {
@@ -49,7 +49,7 @@ Level LevelTraits::level(const char* name) {
if (strcmp(names[i], name)==0)
return Level(i);
}
- throw qpid::Exception(std::string("Invalid log level name: ")+name);
+ throw std::runtime_error(std::string("Invalid log level name: ")+name);
}
const char* LevelTraits::name(Level l) {