From da82e9c8f09f3e471044f8b52ede478ac4d5bc04 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 29 Dec 2015 02:42:43 +0000 Subject: Reshuffle and add new exceptions --- libpqpp/pq-error.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'libpqpp/pq-error.h') diff --git a/libpqpp/pq-error.h b/libpqpp/pq-error.h index 8e7c4bc..fdc855b 100644 --- a/libpqpp/pq-error.h +++ b/libpqpp/pq-error.h @@ -3,24 +3,17 @@ #include #include -#include +#include namespace PQ { - class DLL_PUBLIC Error : public DB::Error { + class Error : public AdHoc::Exception { public: - Error(); - Error(const Error &); - Error(const char *); - ~Error() throw(); + Error(const PGconn *); - const char * what() const throw(); + std::string message() const throw() override; private: - char * msg; - }; - class DLL_PUBLIC ConnectionError : public Error, public virtual DB::ConnectionError { - public: - ConnectionError(const PGconn *); + std::string msg; }; } -- cgit v1.2.3