]> granicus.if.org Git - icinga2/commitdiff
Remove icinga::ErrorInformation.
authorGunnar Beutner <gunnar.beutner@netways.de>
Tue, 27 May 2014 13:51:38 +0000 (15:51 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 27 May 2014 13:51:38 +0000 (15:51 +0200)
Fixes #6333

components/db_ido_mysql/idomysqlconnection.cpp
components/db_ido_pgsql/idopgsqlconnection.cpp
lib/base/exception.cpp
lib/base/exception.hpp

index b5e4009b9caac1bf25df2c828536b8d42065f5fd..bc5443a346c00dedb065c07f48b16e1f13b80952 100644 (file)
@@ -94,8 +94,7 @@ void IdoMysqlConnection::Pause(void)
 
 void IdoMysqlConnection::ExceptionHandler(boost::exception_ptr exp)
 {
-       Log(LogCritical, "db_ido_mysql", "Exception during database operation: '" + ErrorInformation(exp) + "'");
-       Log(LogDebug, "db_ido_mysql", "Exception during database operation: " + DiagnosticInformation(exp));
+       Log(LogWarning, "db_ido_mysql", "Exception during database operation: " + DiagnosticInformation(exp));
 
        boost::mutex::scoped_lock lock(m_ConnectionMutex);
 
index d55693f2955fd8e48a8322ff50ab1961d6982342..fe192c67e0b2c7e8f3b8c42a83531969df2d6b02 100644 (file)
@@ -96,8 +96,7 @@ void IdoPgsqlConnection::Pause(void)
 
 void IdoPgsqlConnection::ExceptionHandler(boost::exception_ptr exp)
 {
-       Log(LogCritical, "db_ido_pgsql", "Exception during database operation: '" + ErrorInformation(exp) + "'");
-       Log(LogDebug, "db_ido_pgsql", "Exception during database operation: " + DiagnosticInformation(exp));
+       Log(LogWarning, "db_ido_pgsql", "Exception during database operation: " + DiagnosticInformation(exp));
 
        boost::mutex::scoped_lock lock(m_ConnectionMutex);
 
index c3da16cef5466e0cf52b08411912d7a451542e20..633c8159aeb4eb95bb86b17e47de0556d2dbde58 100644 (file)
@@ -153,11 +153,3 @@ String icinga::DiagnosticInformation(boost::exception_ptr eptr)
        return boost::diagnostic_information(eptr);
 }
 
-String icinga::ErrorInformation(boost::exception_ptr eptr)
-{
-       try {
-               boost::rethrow_exception(eptr);
-       } catch (const std::exception& ex) {
-               return ex.what();
-       }
-}
index 4cd5bf06fa90adc537d460fd6442c609f4e88a32..dbbb1906ccc9dbae64aea6f3673a1f5b81225637 100644 (file)
@@ -84,18 +84,7 @@ String DiagnosticInformation(const T& ex, StackTrace *stack = NULL, ContextTrace
        return result.str();
 }
 
-template<typename T>
-String ErrorInformation(const T& ex)
-{
-       std::ostringstream result;
-
-       result << ex.what();
-
-       return result.str();
-}
-
 I2_BASE_API String DiagnosticInformation(boost::exception_ptr eptr);
-I2_BASE_API String ErrorInformation(boost::exception_ptr eptr);
 
 class I2_BASE_API posix_error : virtual public std::exception, virtual public boost::exception { };