forked from jurajmasar/rethink-db-cpp-driver
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexception.hpp
39 lines (32 loc) · 1.15 KB
/
exception.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef RETHINK_DB_DRIVER_EXCEPTION
#define RETHINK_DB_DRIVER_EXCEPTION
#include <stdexcept>
#include <string>
using namespace std;
namespace com {
namespace rethinkdb {
namespace driver {
class connection_exception : public runtime_error {
public:
connection_exception() : runtime_error(""){}
connection_exception(const string& msg) : runtime_error(("RethinkDB connection exception. " + msg).c_str()){}
};
class runtime_error_exception : public runtime_error {
public:
runtime_error_exception() : runtime_error(""){}
runtime_error_exception(const string& msg) : runtime_error(("RethinkDB runtime exception. " + msg).c_str()){}
};
class compile_error_exception : public runtime_error {
public:
compile_error_exception() : runtime_error(""){}
compile_error_exception(const string& msg) : runtime_error(("RethinkDB compile error exception. " + msg).c_str()){}
};
class client_error_exception : public runtime_error {
public:
client_error_exception() : runtime_error(""){}
client_error_exception(const string& msg) : runtime_error(("RethinkDB client error exception. " + msg).c_str()){}
};
}
}
}
#endif