summaryrefslogtreecommitdiff
path: root/libmysqlpp/my-error.cpp
blob: 1af24eaa1c73ab669b40391139e694b7c57275c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "my-error.h"
#include <cstring>

MySQL::Error::Error(MYSQL * m) : msg(mysql_error(m)) { }

MySQL::Error::Error(MYSQL_STMT * m) : msg(mysql_stmt_error(m)) { }

std::string
MySQL::Error::message() const noexcept
{
	return msg;
}