summaryrefslogtreecommitdiff
path: root/libodbcpp/error.h
blob: f283a7c302aea78a88b5653d717438e78f978cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef ODBC_ERROR_H
#define ODBC_ERROR_H

#include <sql.h>
#include <exception>

namespace ODBC {
	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;
	};
}

#endif