From: Padraig O'Sullivan Date: Wed, 5 Aug 2009 02:13:37 +0000 (-0400) Subject: Updating the exceptions header file with some slight modifications. X-Git-Tag: 0.34~13^2~17 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=dc78549c4264a89b6210b44e081362e999991a9f;p=awesomized%2Flibmemcached Updating the exceptions header file with some slight modifications. --- diff --git a/libmemcached/exception.hpp b/libmemcached/exception.hpp index 8fb952e1..779280b9 100644 --- a/libmemcached/exception.hpp +++ b/libmemcached/exception.hpp @@ -1,11 +1,8 @@ /* - * Drizzle Client & Protocol Library + * Summary: Exceptions for the C++ interface * - * Copyright (C) 2009 Patrick Galbraith (patg@patg.net) - * All rights reserved. + * Copy: See Copyright for the status of this software. * - * Use and distribution licensed under the BSD license. See - * the COPYING file in this directory for full text. */ /** @@ -19,21 +16,31 @@ #include -namespace memcache { - +namespace memcache +{ class Exception : public std::runtime_error { public: - Exception(const std::string& msg, bool errno) - : std::runtime_error(msg), _errno(errno) {} - Exception(const char *msg, bool errno) - : std::runtime_error(msg), _errno(errno) {} + Exception(const std::string& msg, bool in_errno) + : + std::runtime_error(msg), + errno(in_errno) + {} + + Exception(const char *msg, bool in_errno) + : + std::runtime_error(msg), + errno(in_errno) {} + virtual ~Exception() throw() {} - int getErrno() const { return _errno; } - private: - int _errno; + int getErrno() const + { + return errno; + } + private: + int errno; }; class Warning : public Exception