From 5dd91c7b80443c1f0e747088159c4d8b78d1856d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 24 Dec 2015 04:13:24 +0000 Subject: SQLite files prefixed with sqlite- --- libsqlitepp/sqlite-error.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 libsqlitepp/sqlite-error.cpp (limited to 'libsqlitepp/sqlite-error.cpp') diff --git a/libsqlitepp/sqlite-error.cpp b/libsqlitepp/sqlite-error.cpp new file mode 100644 index 0000000..a0758ef --- /dev/null +++ b/libsqlitepp/sqlite-error.cpp @@ -0,0 +1,29 @@ +#include "sqlite-error.h" +#include + +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"; +} + -- cgit v1.2.3