pg_async
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
error.hpp
Go to the documentation of this file.
1 
8 #ifndef TIP_DB_PG_ERROR_HPP_
9 #define TIP_DB_PG_ERROR_HPP_
10 
11 #include <stdexcept>
12 #include <tip/db/pg/sqlstates.hpp>
13 
14 namespace tip {
15 namespace db {
16 namespace pg {
17 namespace error {
18 
22 class db_error : public std::runtime_error {
23 public:
24  explicit db_error( std::string const& what_arg );
25  explicit db_error( char const* what_arg );
26  db_error(std::string const& message,
34 };
35 
40 class connection_error : public db_error {
41 public:
42  explicit connection_error( std::string const&);
43  explicit connection_error( char const* what_arg );
44 };
45 
49 class query_error : public db_error {
50 public:
51  explicit query_error( std::string const&);
52  explicit query_error( char const* what_arg );
53 
54  query_error(std::string const& message,
58  );
59 };
60 
66 class client_error : public db_error {
67 public:
68  explicit client_error( std::string const& );
69  explicit client_error( char const*);
70  explicit client_error( std::exception const&);
71 };
72 
76 class value_is_null : public db_error {
77 public:
78  explicit value_is_null(std::string const& field_name);
79 };
80 
81 } // namespace error
82 } // namespace pg
83 } // namespace db
84 } // namespace tip
85 
86 
87 
88 #endif /* TIP_DB_PG_ERROR_HPP_ */
connection_error(std::string const &)
db_error(std::string const &what_arg)
client_error(std::string const &)
An error generated by the PostgreSQL server when executing a query.
Definition: error.hpp:49
An attempt to extract a value from a null field was made.
Definition: error.hpp:76
value_is_null(std::string const &field_name)
sqlstate::code sqlstate
Definition: error.hpp:33
Base class for exceptions generated by the library.
Definition: error.hpp:22
An exception was caught in a callback.
Definition: error.hpp:66
query_error(std::string const &)
Connection with the database server failure. Includes network and authentication failures.
Definition: error.hpp:40