Merge in all of libtest updates.
[awesomized/libmemcached] / libmemcached / exception.hpp
index 0754dff02f6865310fe72f3b68dc1e758958bbf1..4759072abdd758445e47674f37ef52cd9f151835 100644 (file)
  * @brief Exception declarations
  */
 
-#ifndef LIBMEMACHED_EXCEPTION_HPP
-#define LIBMEMACHED_EXCEPTION_HPP
+#pragma once
 
 #include <stdexcept>
-
+#include <string>
 
 namespace memcache 
 {
@@ -29,7 +28,7 @@ namespace memcache
 
     Exception(const char *msg, int in_errno)
       : 
-        std::runtime_error(msg), 
+        std::runtime_error(std::string(msg)), 
         _errno(in_errno) {}
 
     virtual ~Exception() throw() {}
@@ -59,5 +58,3 @@ namespace memcache
   };
 
 } /* namespace libmemcached */
-
-#endif /* LIBMEMACHED_EXCEPTION_HPP */