Browse Source

[master] use terminate() instead of assert(false) for forceful termination

JINMEI Tatuya 12 years ago
parent
commit
296e119946
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/bin/auth/datasrc_clients_mgr.h

+ 3 - 2
src/bin/auth/datasrc_clients_mgr.h

@@ -36,6 +36,7 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/noncopyable.hpp>
 
+#include <exception>
 #include <list>
 #include <utility>
 
@@ -406,10 +407,10 @@ DataSrcClientsBuilderBase<MutexType, CondVarType>::run() {
         // We explicitly catch exceptions so we can log it as soon as possible.
         LOG_FATAL(auth_logger, AUTH_DATASRC_CLIENTS_BUILDER_FAILED).
             arg(ex.what());
-        assert(false);
+        std::terminate();
     } catch (...) {
         LOG_FATAL(auth_logger, AUTH_DATASRC_CLIENTS_BUILDER_FAILED_UNEXPECTED);
-        assert(false);
+        std::terminate();
     }
 }