diff options
Diffstat (limited to 'odb/pgsql/exceptions.hxx')
-rw-r--r-- | odb/pgsql/exceptions.hxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/odb/pgsql/exceptions.hxx b/odb/pgsql/exceptions.hxx index 0ceb83c..d6cae70 100644 --- a/odb/pgsql/exceptions.hxx +++ b/odb/pgsql/exceptions.hxx @@ -20,6 +20,36 @@ namespace odb { namespace pgsql { + struct LIBODB_PGSQL_EXPORT database_exception: odb::database_exception + { + database_exception (const std::string& message); + + database_exception (const std::string& sqlstate, + const std::string& message); + + ~database_exception () throw (); + + const std::string& + message () const + { + return message_; + } + + const std::string& + sqlstate () const + { + return sqlstate_; + } + + virtual const char* + what () const throw (); + + private: + std::string sqlstate_; + std::string message_; + std::string what_; + }; + struct LIBODB_PGSQL_EXPORT cli_exception: odb::exception { cli_exception (const std::string& what); |