2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
22 class Exception : public std::runtime_error {
24 Exception(const std::string &msg, int in_errno)
25 : std::runtime_error(msg)
28 Exception(const char *msg, int in_errno)
29 : std::runtime_error(std::string(msg))
32 virtual ~Exception() throw() {}
34 int getErrno() const { return _errno; }
40 class Warning : public Exception {
42 Warning(const std::string &msg, int in_errno)
43 : Exception(msg, in_errno) {}
44 Warning(const char *msg, int in_errno)
45 : Exception(msg, in_errno) {}
48 class Error : public Exception {
50 Error(const std::string &msg, int in_errno)
51 : Exception(msg, in_errno) {}
52 Error(const char *msg, int in_errno)
53 : Exception(msg, in_errno) {}
54 virtual ~Error() throw() {}
57 } // namespace memcache