Lines 17-22
Link Here
|
17 |
#include <string> |
17 |
#include <string> |
18 |
#include <memory> |
18 |
#include <memory> |
19 |
|
19 |
|
|
|
20 |
#define CPPCONN_PUBLIC_EXCEPTION __attribute__((visibility("default"))) |
21 |
|
20 |
namespace sql |
22 |
namespace sql |
21 |
{ |
23 |
{ |
22 |
|
24 |
|
Lines 37-43
Link Here
|
37 |
#pragma warning(push) |
39 |
#pragma warning(push) |
38 |
#pragma warning(disable: 4275) |
40 |
#pragma warning(disable: 4275) |
39 |
#endif |
41 |
#endif |
40 |
class CPPCONN_PUBLIC_FUNC SQLException : public std::runtime_error |
42 |
class CPPCONN_PUBLIC_EXCEPTION SQLException : public std::runtime_error |
41 |
{ |
43 |
{ |
42 |
#ifdef _WIN32 |
44 |
#ifdef _WIN32 |
43 |
#pragma warning(pop) |
45 |
#pragma warning(pop) |
Lines 83-108
Link Here
|
83 |
MEMORY_ALLOC_OPERATORS(SQLException) |
85 |
MEMORY_ALLOC_OPERATORS(SQLException) |
84 |
}; |
86 |
}; |
85 |
|
87 |
|
86 |
struct CPPCONN_PUBLIC_FUNC MethodNotImplementedException : public SQLException |
88 |
struct CPPCONN_PUBLIC_EXCEPTION MethodNotImplementedException : public SQLException |
87 |
{ |
89 |
{ |
88 |
MethodNotImplementedException(const MethodNotImplementedException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } |
90 |
MethodNotImplementedException(const MethodNotImplementedException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } |
89 |
MethodNotImplementedException(const std::string& reason) : SQLException(reason, "", 0) {} |
91 |
MethodNotImplementedException(const std::string& reason) : SQLException(reason, "", 0) {} |
90 |
}; |
92 |
}; |
91 |
|
93 |
|
92 |
struct CPPCONN_PUBLIC_FUNC InvalidArgumentException : public SQLException |
94 |
struct CPPCONN_PUBLIC_EXCEPTION InvalidArgumentException : public SQLException |
93 |
{ |
95 |
{ |
94 |
InvalidArgumentException(const InvalidArgumentException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } |
96 |
InvalidArgumentException(const InvalidArgumentException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } |
95 |
InvalidArgumentException(const std::string& reason) : SQLException(reason, "", 0) {} |
97 |
InvalidArgumentException(const std::string& reason) : SQLException(reason, "", 0) {} |
96 |
}; |
98 |
}; |
97 |
|
99 |
|
98 |
struct CPPCONN_PUBLIC_FUNC InvalidInstanceException : public SQLException |
100 |
struct CPPCONN_PUBLIC_EXCEPTION InvalidInstanceException : public SQLException |
99 |
{ |
101 |
{ |
100 |
InvalidInstanceException(const InvalidInstanceException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } |
102 |
InvalidInstanceException(const InvalidInstanceException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } |
101 |
InvalidInstanceException(const std::string& reason) : SQLException(reason, "", 0) {} |
103 |
InvalidInstanceException(const std::string& reason) : SQLException(reason, "", 0) {} |
102 |
}; |
104 |
}; |
103 |
|
105 |
|
104 |
|
106 |
|
105 |
struct CPPCONN_PUBLIC_FUNC NonScrollableException : public SQLException |
107 |
struct CPPCONN_PUBLIC_EXCEPTION NonScrollableException : public SQLException |
106 |
{ |
108 |
{ |
107 |
NonScrollableException(const NonScrollableException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } |
109 |
NonScrollableException(const NonScrollableException& e) : SQLException(e.what(), e.sql_state, e.errNo) { } |
108 |
NonScrollableException(const std::string& reason) : SQLException(reason, "", 0) {} |
110 |
NonScrollableException(const std::string& reason) : SQLException(reason, "", 0) {} |