summaryrefslogtreecommitdiff
path: root/libodbcpp/error.h
diff options
context:
space:
mode:
Diffstat (limited to 'libodbcpp/error.h')
-rw-r--r--libodbcpp/error.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libodbcpp/error.h b/libodbcpp/error.h
index f7c2958..f283a7c 100644
--- a/libodbcpp/error.h
+++ b/libodbcpp/error.h
@@ -2,14 +2,20 @@
#define ODBC_ERROR_H
#include <sql.h>
+#include <exception>
namespace ODBC {
- class Error {
+ class Error : public std::exception {
public:
Error(RETCODE err, SQLSMALLINT handletype, SQLHANDLE handle, char const * action, ...)
__attribute__((format(printf, 5, 6)));
Error(char const * action, ...)
__attribute__((format(printf, 2, 3)));
+ ~Error() throw();
+
+ const char * what() const throw();
+ private:
+ char * msg;
};
}