summaryrefslogtreecommitdiff
path: root/libmysqlpp/my-error.h
blob: b0338dd75f219c6188ea6e36e40455b971b10b79 (plain)
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
#ifndef MY_ERROR_H
#define MY_ERROR_H

#include "error.h" // IWYU pragma: export
#include <exception.h>
#include <string>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <mysql.h>
#pragma GCC diagnostic pop
// IWYU pragma: no_forward_declare DB::Error

namespace MySQL {
	class Error : public AdHoc::Exception<DB::Error> {
	public:
		explicit Error(MYSQL_STMT *);
		explicit Error(MYSQL *);
		std::string message() const noexcept override;

	private:
		std::string msg;
	};
}

#endif