Author: aconway
Date: Thu Jan 24 15:10:20 2008
New Revision: 615075

URL: http://svn.apache.org/viewvc?rev=615075&view=rev
Log:

Fixed re-entry problem with exceptions throw in logger code.
 - src/qpid/log/Logger.cpp
 - src/qpid/log/Statement.cpp

Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/log/Logger.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/log/Statement.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/log/Logger.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/log/Logger.cpp?rev=615075&r1=615074&r2=615075&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/log/Logger.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/log/Logger.cpp Thu Jan 24 15:10:20 
2008
@@ -29,6 +29,7 @@
 #include <sstream>
 #include <fstream>
 #include <iomanip>
+#include <stdexcept>
 #include <syslog.h>
 
 
@@ -50,7 +51,7 @@
         : 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) {

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/log/Statement.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/log/Statement.cpp?rev=615075&r1=615074&r2=615075&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/log/Statement.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/log/Statement.cpp Thu Jan 24 
15:10:20 2008
@@ -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 @@
         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) {


Reply via email to