summaryrefslogtreecommitdiff
path: root/libsqlitepp/sqlite-error.cpp
blob: a0758ef684c0184de0a2aa40d21c50a1fc7eb913 (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
26
27
28
29
#include "sqlite-error.h"
#include <string.h>

SQLite::Error::Error() :
	msg(NULL)
{
}

SQLite::Error::Error(const SQLite::Error & e) :
	msg(e.msg ? strdup(e.msg) : NULL)
{
}

SQLite::Error::Error(const char * e) :
	msg(e ? strdup(e) : NULL)
{
}

SQLite::Error::~Error() throw()
{
	free(msg);
}

const char *
SQLite::Error::what() const throw()
{
	return msg ? msg : "No message";
}