All exception types thrown by libpqxx are derived from pqxx::failure, so that should be your starting point in exploring them. When you write a catch clause in your code, it's probably worth either having a separate clause for failure and its subclasses, or checking at run time whether an error is of this type using dynamic_cast<pqxx::failure const *>(...). if the exception is a libpqxx exception, you can get a lot of extra information that's not normally available in exceptions.
There is no multiple inheritance in this class hierarchy. That means that the different kinds of libpqxx exception are not reflected in inheritance from std::logic_error, std::runtime_error, and so on. They are all derived from pqxx::failure (whether directly or indirectly), which in turn inherits directly from std::exception.
You may wonder whether this was the best design decision. Before libpqxx 8, various libpqxx exceptions derived from different types in the standard C++ exception hierarchy (std::out_of_range, std::argument_error, and so on). But in practice we saw that:
- The standard exception type distinctions are not very actionable.
- Applications would generally just catch
std::exception anyway.
- Important properties never quite follow a neat hierarchy.
- Making effective use of the hierarchy was hard, finicky work.
- A
try could end up with a lot of highly similar catch clauses.
- Shaping the hierarchy around one exception property would confuse another.
So as of libpqxx 8, if you want more detail in how you handle different types of exceptions, you use member functions, mostly at run time. All of the properties are available right from the top down, in the failure base class. Some of the strings will not apply to all types of exception, but in those cases, they will simply be empty strings.
In libpqxx, the exception hierarchy exists not for taxonomy's sake but to enable your application to function well without requiring too much code or effort from you. In most cases, when an exception occurs, both the safest and the easiest thing to do is drop the objects involved in the error, report what happened, and move on from a reliable state. That is what these classes are here to support.
◆ pqxx::failure
Base class for all exceptions specific to libpqxx.
Public Member Functions |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
| virtual bool | poisons_transaction () const noexcept |
| | Does this type of error make an ongoing dbtransaction unusable? More...
|
| |
| virtual std::string_view | name () const noexcept |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
Protected Member Functions |
| | failure (std::string whatarg, std::string stat, std::string sqls, sl loc=sl::current(), st tr=st::current()) |
| |
◆ failure() [1/5]
| pqxx::failure::failure |
( |
failure const & |
| ) |
|
|
default |
◆ failure() [2/5]
| pqxx::failure::failure |
( |
failure && |
| ) |
|
|
default |
◆ failure() [3/5]
◆ failure() [4/5]
| pqxx::failure::failure |
( |
std::string |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ ~failure()
| pqxx::failure::~failure |
( |
| ) |
|
|
overridedefaultnoexcept |
◆ failure() [5/5]
| pqxx::failure::failure |
( |
std::string |
whatarg, |
|
|
std::string |
stat, |
|
|
std::string |
sqls, |
|
|
sl |
loc = sl::current(), |
|
|
st |
tr = st::current() |
|
) |
| |
|
inlineprotected |
For constructing derived exception types with the additional fields.
◆ location()
Best known std::source_location for where the error occurred.
Generally there's no one single source location, but the exception only stores one. This is generally either one that the caller passed to a libpqxx call, or the place where the caller called libpqxx.
◆ name()
| std::string_view pqxx::failure::name |
( |
| ) |
const |
|
virtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
The ongoing transaction has deadlocked. Retrying it may help.
Definition: except.hxx:544
Base class for all exceptions specific to libpqxx.
Definition: except.hxx:76
Reimplemented in pqxx::plpgsql_too_many_rows, pqxx::plpgsql_no_data_found, pqxx::plpgsql_raise, pqxx::plpgsql_error, pqxx::too_many_connections, pqxx::server_out_of_memory, pqxx::disk_full, pqxx::insufficient_resources, pqxx::insufficient_privilege, pqxx::undefined_table, pqxx::undefined_function, pqxx::undefined_column, pqxx::syntax_error, pqxx::invalid_cursor_name, pqxx::invalid_sql_statement_name, pqxx::invalid_cursor_state, pqxx::check_violation, pqxx::unique_violation, pqxx::foreign_key_violation, pqxx::not_null_violation, pqxx::restrict_violation, pqxx::integrity_constraint_violation, pqxx::data_exception, pqxx::feature_not_supported, pqxx::unexpected_rows, pqxx::range_error, pqxx::conversion_overrun, pqxx::unexpected_null, pqxx::conversion_error, pqxx::argument_error, pqxx::usage_error, pqxx::internal_error, pqxx::deadlock_detected, pqxx::statement_completion_unknown, pqxx::serialization_failure, pqxx::transaction_rollback, pqxx::in_doubt_error, pqxx::protocol_violation, pqxx::sql_error, pqxx::variable_set_to_null, pqxx::version_mismatch, and pqxx::broken_connection.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ poisons_connection()
| virtual bool pqxx::failure::poisons_connection |
( |
| ) |
const |
|
inlinevirtualnoexcept |
◆ poisons_transaction()
| virtual bool pqxx::failure::poisons_transaction |
( |
| ) |
const |
|
inlinevirtualnoexcept |
Does this type of error make an ongoing dbtransaction unusable?
When this is the case, before you try to do anything else, you'll want to close any transaction you may have open. If necessary, a call to poisons_connection() will tell you whether it is still possible (and advisable) to open a new one on the same connection.
If you are using a nontransaction, bear in mind that it is not derived from dbtransaction. So if you see an exception which reports that it poisons transactions but not the connection, then a nontransaction should still be usable.
- Note
- This is a general indication based on the type of exception. It can be wrong for some specific situations.
Reimplemented in pqxx::feature_not_supported, pqxx::usage_error, pqxx::internal_error, pqxx::serialization_failure, pqxx::transaction_rollback, pqxx::in_doubt_error, pqxx::protocol_violation, pqxx::sql_error, and pqxx::broken_connection.
◆ query()
| PQXX_PURE std::string_view pqxx::failure::query |
( |
| ) |
const |
|
inlinenoexcept |
SQL statement that encountered the error, if applicable; or empty string.
In some cases there will be a placeholder string, to give a rough indication of an SQL operation that's being performed in your name, such as beginning or committing a transaction. Those will be in square brackets: [COMMIT] etc.
◆ sqlstate()
| PQXX_PURE std::string_view pqxx::failure::sqlstate |
( |
| ) |
const |
|
inlinenoexcept |
◆ trace()
| PQXX_PURE std::shared_ptr<st const> pqxx::failure::trace |
( |
| ) |
const |
|
inlinenoexcept |
If available in this compiler, a std::stacktrace of this exception.
The stacktrace does not include the creation of the exception object itself. By default it goes right up to that point. You can pass a stacktrace of your own choosing to the exception constructors, if you really want, but it generally makes more sense to use the default.
If std::stacktrace was not available when the libpqxx build was configured, this returns an empty ("null") pointer to pqxx::stacktrace_placeholder.
This is meant to keep the ABI for pqxx::failure stable across builds with and without std::stacktrace, and make it easy to upgrade the compiler and get the feature.
◆ what()
| PQXX_PURE char const* pqxx::failure::what |
( |
| ) |
const |
|
inlineoverridenoexcept |
◆ pqxx::broken_connection
| struct pqxx::broken_connection |
Exception class for lost or failed backend connection.
- Warning
- When this happens on Unix-like systems, you may also get a SIGPIPE signal. That signal aborts the program by default, so if you wish to be able to continue after a connection breaks, be sure to disarm this signal.
If you're working on a Unix-like system, see the manual page for signal (2) on how to deal with SIGPIPE. The easiest way to make this signal harmless is to make your program ignore it:
#include <csignal>
int main()
{
std::signal(SIGPIPE, SIG_IGN);
}
Public Member Functions |
| | broken_connection (sl loc=sl::current(), st &&tr=st::current()) |
| |
| | broken_connection (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| bool | poisons_connection () const noexcept override |
| | By its nature, this type of error makes the connection unusable. More...
|
| |
| bool | poisons_transaction () const noexcept override |
| | When the connection breaks, so will an ongoing transaction. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
◆ broken_connection() [1/2]
| pqxx::broken_connection::broken_connection |
( |
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ broken_connection() [2/2]
| pqxx::broken_connection::broken_connection |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::broken_connection::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::failure.
Reimplemented in pqxx::too_many_connections, and pqxx::version_mismatch.
◆ poisons_connection()
| bool pqxx::broken_connection::poisons_connection |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
By its nature, this type of error makes the connection unusable.
Reimplemented from pqxx::failure.
◆ poisons_transaction()
| bool pqxx::broken_connection::poisons_transaction |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
When the connection breaks, so will an ongoing transaction.
Reimplemented from pqxx::failure.
◆ pqxx::version_mismatch
| struct pqxx::version_mismatch |
Could not establish connection due to version mismatch.
Public Member Functions |
| | version_mismatch (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | broken_connection (sl loc=sl::current(), st &&tr=st::current()) |
| |
| | broken_connection (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_connection () const noexcept override |
| | By its nature, this type of error makes the connection unusable. More...
|
| |
| bool | poisons_transaction () const noexcept override |
| | When the connection breaks, so will an ongoing transaction. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
◆ version_mismatch()
| pqxx::version_mismatch::version_mismatch |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::version_mismatch::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::broken_connection.
◆ pqxx::variable_set_to_null
| struct pqxx::variable_set_to_null |
The caller attempted to set a variable to null, which is not allowed.
Public Member Functions |
| | variable_set_to_null (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
| virtual bool | poisons_transaction () const noexcept |
| | Does this type of error make an ongoing dbtransaction unusable? More...
|
| |
◆ variable_set_to_null()
| pqxx::variable_set_to_null::variable_set_to_null |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::variable_set_to_null::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::failure.
◆ pqxx::sql_error
Exception class for failed queries.
Carries, in addition to a regular error message, a copy of the failed query and (if available) the SQLSTATE value accompanying the error.
These exception classes follow, roughly, the two-level hierarchy defined by the PostgreSQL SQLSTATE error codes (see Appendix A of the PostgreSQL documentation corresponding to your server version). This is not a complete mapping though. There are other differences as well, e.g. the error code for statement_completion_unknown has a separate status in libpqxx as in_doubt_error, and too_many_connections is classified as a broken_connection rather than a subtype of insufficient_resources.
Public Member Functions |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ sql_error() [1/3]
| PQXX_ZARGS pqxx::sql_error::sql_error |
( |
std::string const & |
whatarg = {}, |
|
|
std::string const & |
stmt = {}, |
|
|
std::string const & |
sqls = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ sql_error() [2/3]
| pqxx::sql_error::sql_error |
( |
sql_error const & |
other | ) |
|
|
default |
◆ sql_error() [3/3]
| pqxx::sql_error::sql_error |
( |
sql_error && |
other | ) |
|
|
default |
◆ ~sql_error()
| pqxx::sql_error::~sql_error |
( |
| ) |
|
|
overridedefault |
◆ name()
| std::string_view pqxx::sql_error::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::failure.
Reimplemented in pqxx::plpgsql_too_many_rows, pqxx::plpgsql_no_data_found, pqxx::plpgsql_raise, pqxx::plpgsql_error, pqxx::server_out_of_memory, pqxx::disk_full, pqxx::insufficient_resources, pqxx::insufficient_privilege, pqxx::undefined_table, pqxx::undefined_function, pqxx::undefined_column, pqxx::syntax_error, pqxx::invalid_cursor_name, pqxx::invalid_sql_statement_name, pqxx::invalid_cursor_state, pqxx::check_violation, pqxx::unique_violation, pqxx::foreign_key_violation, pqxx::not_null_violation, pqxx::restrict_violation, pqxx::integrity_constraint_violation, pqxx::data_exception, pqxx::feature_not_supported, pqxx::deadlock_detected, pqxx::statement_completion_unknown, pqxx::serialization_failure, pqxx::transaction_rollback, and pqxx::protocol_violation.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ poisons_transaction()
| bool pqxx::sql_error::poisons_transaction |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
◆ pqxx::protocol_violation
| struct pqxx::protocol_violation |
Exception class for mis-communication with the server.
This happens when the conversation between libpq and the server gets messed up. There aren't many situations where this happens, but one known instance is when you call a parameterised or prepared statement with the wrong number of parameters.
When this happens, your connection will most likely be in a broken state and you're probably best off discarding it and starting a new one. In that sense it is like broken_connection.
Retrying your statement is not likely to make this problem go away.
Public Member Functions |
| | protocol_violation (std::string const &whatarg, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_connection () const noexcept override |
| | When this happens, the connection is in a confused state. More...
|
| |
| bool | poisons_transaction () const noexcept override |
| | Since the connection is broken, so is a transaction. More...
|
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
◆ protocol_violation()
| pqxx::protocol_violation::protocol_violation |
( |
std::string const & |
whatarg, |
|
|
std::string const & |
stmt = {}, |
|
|
std::string const & |
sqls = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::protocol_violation::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
◆ poisons_connection()
| bool pqxx::protocol_violation::poisons_connection |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
When this happens, the connection is in a confused state.
Reimplemented from pqxx::failure.
◆ poisons_transaction()
| bool pqxx::protocol_violation::poisons_transaction |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
Since the connection is broken, so is a transaction.
Reimplemented from pqxx::sql_error.
◆ pqxx::in_doubt_error
| struct pqxx::in_doubt_error |
"Help, I don't know whether transaction was committed successfully!"
Exception that might be thrown in rare cases where the connection to the database is lost while finishing a database transaction, and there's no way of telling whether it was actually executed by the backend. In this case the database is left in an indeterminate (but consistent) state, and only manual inspection will tell which is the case.
Public Member Functions |
| | in_doubt_error (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_connection () const noexcept override |
| | This kind of error can only happen when the connection breaks. More...
|
| |
| bool | poisons_transaction () const noexcept override |
| | The transaction is already closed, and the connection is broken. More...
|
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
◆ in_doubt_error()
| pqxx::in_doubt_error::in_doubt_error |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::in_doubt_error::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::failure.
◆ poisons_connection()
| bool pqxx::in_doubt_error::poisons_connection |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
This kind of error can only happen when the connection breaks.
Reimplemented from pqxx::failure.
◆ poisons_transaction()
| bool pqxx::in_doubt_error::poisons_transaction |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
The transaction is already closed, and the connection is broken.
Reimplemented from pqxx::failure.
◆ pqxx::transaction_rollback
| struct pqxx::transaction_rollback |
The backend saw itself forced to roll back the ongoing transaction.
Public Member Functions |
| PQXX_ZARGS | transaction_rollback (std::string const &whatarg, std::string const &q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_transaction () const noexcept override |
| | Some earlier failure broke the transaction. More...
|
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ transaction_rollback()
| PQXX_ZARGS pqxx::transaction_rollback::transaction_rollback |
( |
std::string const & |
whatarg, |
|
|
std::string const & |
q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::transaction_rollback::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
Reimplemented in pqxx::deadlock_detected, pqxx::statement_completion_unknown, and pqxx::serialization_failure.
◆ poisons_transaction()
| bool pqxx::transaction_rollback::poisons_transaction |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
◆ pqxx::serialization_failure
| struct pqxx::serialization_failure |
Transaction failed to serialize. Please retry the whole thing.
Can only happen at transaction isolation levels REPEATABLE READ and SERIALIZABLE.
The current transaction cannot be committed without violating the guarantees made by its isolation level. This is the effect of a conflict with another ongoing transaction. The transaction may still succeed if you try to perform it again.
Public Member Functions |
| PQXX_ZARGS | serialization_failure (std::string const &whatarg, std::string const &q, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_transaction () const noexcept override |
| | To retry the transaction, you'll need to start a fresh one. More...
|
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | transaction_rollback (std::string const &whatarg, std::string const &q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ serialization_failure()
| PQXX_ZARGS pqxx::serialization_failure::serialization_failure |
( |
std::string const & |
whatarg, |
|
|
std::string const & |
q, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::serialization_failure::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::transaction_rollback.
◆ poisons_transaction()
| bool pqxx::serialization_failure::poisons_transaction |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
◆ pqxx::statement_completion_unknown
| struct pqxx::statement_completion_unknown |
We can't tell whether our last statement succeeded.
Public Member Functions |
| PQXX_ZARGS | statement_completion_unknown (std::string const &whatarg, std::string const &q, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_connection () const noexcept override |
| | It's not advisable to continue using the connection after this. More...
|
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | transaction_rollback (std::string const &whatarg, std::string const &q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_transaction () const noexcept override |
| | Some earlier failure broke the transaction. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
◆ statement_completion_unknown()
| PQXX_ZARGS pqxx::statement_completion_unknown::statement_completion_unknown |
( |
std::string const & |
whatarg, |
|
|
std::string const & |
q, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::statement_completion_unknown::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::transaction_rollback.
◆ poisons_connection()
| bool pqxx::statement_completion_unknown::poisons_connection |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
It's not advisable to continue using the connection after this.
Reimplemented from pqxx::failure.
◆ pqxx::deadlock_detected
| struct pqxx::deadlock_detected |
The ongoing transaction has deadlocked. Retrying it may help.
Public Member Functions |
| PQXX_ZARGS | deadlock_detected (std::string const &whatarg, std::string const &q, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | transaction_rollback (std::string const &whatarg, std::string const &q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_transaction () const noexcept override |
| | Some earlier failure broke the transaction. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ deadlock_detected()
| PQXX_ZARGS pqxx::deadlock_detected::deadlock_detected |
( |
std::string const & |
whatarg, |
|
|
std::string const & |
q, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::deadlock_detected::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::transaction_rollback.
◆ pqxx::internal_error
| struct pqxx::internal_error |
Internal error in libpqxx library.
Public Member Functions |
| | internal_error (std::string const &, sl=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_connection () const noexcept override |
| | When this happens, all bets are off. It may work, but don't risk it. More...
|
| |
| bool | poisons_transaction () const noexcept override |
| | When this happens, all bets are off. It may work, but don't risk it. More...
|
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
◆ internal_error()
| pqxx::internal_error::internal_error |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
explicit |
◆ name()
| std::string_view pqxx::internal_error::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::failure.
◆ poisons_connection()
| bool pqxx::internal_error::poisons_connection |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
When this happens, all bets are off. It may work, but don't risk it.
Reimplemented from pqxx::failure.
◆ poisons_transaction()
| bool pqxx::internal_error::poisons_transaction |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
When this happens, all bets are off. It may work, but don't risk it.
Reimplemented from pqxx::failure.
◆ pqxx::usage_error
Error in usage of libpqxx library, similar to std::logic_error.
Public Member Functions |
| | usage_error (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_transaction () const noexcept override |
| | Your transaction will probably still work, but something is badly wrong. More...
|
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ usage_error()
| pqxx::usage_error::usage_error |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::usage_error::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::failure.
◆ poisons_transaction()
| bool pqxx::usage_error::poisons_transaction |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
Your transaction will probably still work, but something is badly wrong.
Reimplemented from pqxx::failure.
◆ pqxx::argument_error
| struct pqxx::argument_error |
Invalid argument passed to libpqxx, similar to std::invalid_argument.
Public Member Functions |
| | argument_error (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
| virtual bool | poisons_transaction () const noexcept |
| | Does this type of error make an ongoing dbtransaction unusable? More...
|
| |
◆ argument_error()
| pqxx::argument_error::argument_error |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::argument_error::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::failure.
◆ pqxx::conversion_error
| struct pqxx::conversion_error |
Value conversion failed, e.g. when converting "Hello" to int.
Public Member Functions |
| | conversion_error (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
| virtual bool | poisons_transaction () const noexcept |
| | Does this type of error make an ongoing dbtransaction unusable? More...
|
| |
◆ conversion_error()
| pqxx::conversion_error::conversion_error |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::conversion_error::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::failure.
Reimplemented in pqxx::conversion_overrun, and pqxx::unexpected_null.
◆ pqxx::unexpected_null
| struct pqxx::unexpected_null |
Could not convert null value: target type does not support null.
Public Member Functions |
| | unexpected_null (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | conversion_error (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
| virtual bool | poisons_transaction () const noexcept |
| | Does this type of error make an ongoing dbtransaction unusable? More...
|
| |
◆ unexpected_null()
| pqxx::unexpected_null::unexpected_null |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::unexpected_null::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::conversion_error.
◆ pqxx::conversion_overrun
| struct pqxx::conversion_overrun |
Could not convert value to string: not enough buffer space.
Public Member Functions |
| | conversion_overrun (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | conversion_error (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
| virtual bool | poisons_transaction () const noexcept |
| | Does this type of error make an ongoing dbtransaction unusable? More...
|
| |
◆ conversion_overrun()
| pqxx::conversion_overrun::conversion_overrun |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::conversion_overrun::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::conversion_error.
◆ pqxx::range_error
Something is out of range, similar to std::out_of_range.
Public Member Functions |
| | range_error (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
| virtual bool | poisons_transaction () const noexcept |
| | Does this type of error make an ongoing dbtransaction unusable? More...
|
| |
◆ range_error()
| pqxx::range_error::range_error |
( |
std::string const & |
whatarg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::range_error::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::failure.
Reimplemented in pqxx::unexpected_rows.
◆ pqxx::unexpected_rows
| struct pqxx::unexpected_rows |
Query returned an unexpected number of rows.
Public Member Functions |
| | unexpected_rows (std::string const &msg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | range_error (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
| virtual bool | poisons_transaction () const noexcept |
| | Does this type of error make an ongoing dbtransaction unusable? More...
|
| |
◆ unexpected_rows()
| pqxx::unexpected_rows::unexpected_rows |
( |
std::string const & |
msg, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::unexpected_rows::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::range_error.
◆ pqxx::feature_not_supported
| struct pqxx::feature_not_supported |
Database feature not supported in current setup.
Public Member Functions |
| PQXX_ZARGS | feature_not_supported (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| bool | poisons_connection () const noexcept override |
| | It all depends on the details, but this can break your connection. More...
|
| |
| bool | poisons_transaction () const noexcept override |
| | If this poisons your connection, it also poisons your transaction. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
◆ feature_not_supported()
| PQXX_ZARGS pqxx::feature_not_supported::feature_not_supported |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::feature_not_supported::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
◆ poisons_connection()
| bool pqxx::feature_not_supported::poisons_connection |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
It all depends on the details, but this can break your connection.
Reimplemented from pqxx::failure.
◆ poisons_transaction()
| bool pqxx::feature_not_supported::poisons_transaction |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
If this poisons your connection, it also poisons your transaction.
Reimplemented from pqxx::sql_error.
◆ pqxx::data_exception
| struct pqxx::data_exception |
Error in data provided to SQL statement.
Public Member Functions |
| PQXX_ZARGS | data_exception (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ data_exception()
| PQXX_ZARGS pqxx::data_exception::data_exception |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::data_exception::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
◆ pqxx::integrity_constraint_violation
| struct pqxx::integrity_constraint_violation |
Public Member Functions |
| PQXX_ZARGS | integrity_constraint_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ integrity_constraint_violation()
| PQXX_ZARGS pqxx::integrity_constraint_violation::integrity_constraint_violation |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::integrity_constraint_violation::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
Reimplemented in pqxx::check_violation, pqxx::unique_violation, pqxx::foreign_key_violation, pqxx::not_null_violation, and pqxx::restrict_violation.
◆ pqxx::restrict_violation
| struct pqxx::restrict_violation |
Public Member Functions |
| PQXX_ZARGS | restrict_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | integrity_constraint_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ restrict_violation()
| PQXX_ZARGS pqxx::restrict_violation::restrict_violation |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::restrict_violation::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::integrity_constraint_violation.
◆ pqxx::not_null_violation
| struct pqxx::not_null_violation |
Public Member Functions |
| PQXX_ZARGS | not_null_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | integrity_constraint_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ not_null_violation()
| PQXX_ZARGS pqxx::not_null_violation::not_null_violation |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::not_null_violation::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::integrity_constraint_violation.
◆ pqxx::foreign_key_violation
| struct pqxx::foreign_key_violation |
Public Member Functions |
| PQXX_ZARGS | foreign_key_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | integrity_constraint_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ foreign_key_violation()
| PQXX_ZARGS pqxx::foreign_key_violation::foreign_key_violation |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::foreign_key_violation::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::integrity_constraint_violation.
◆ pqxx::unique_violation
| struct pqxx::unique_violation |
Public Member Functions |
| PQXX_ZARGS | unique_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | integrity_constraint_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ unique_violation()
| PQXX_ZARGS pqxx::unique_violation::unique_violation |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::unique_violation::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::integrity_constraint_violation.
◆ pqxx::check_violation
| struct pqxx::check_violation |
Public Member Functions |
| PQXX_ZARGS | check_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | integrity_constraint_violation (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ check_violation()
| PQXX_ZARGS pqxx::check_violation::check_violation |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::check_violation::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::integrity_constraint_violation.
◆ pqxx::invalid_cursor_state
| struct pqxx::invalid_cursor_state |
Public Member Functions |
| PQXX_ZARGS | invalid_cursor_state (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ invalid_cursor_state()
| PQXX_ZARGS pqxx::invalid_cursor_state::invalid_cursor_state |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::invalid_cursor_state::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
◆ pqxx::invalid_sql_statement_name
| struct pqxx::invalid_sql_statement_name |
Public Member Functions |
| PQXX_ZARGS | invalid_sql_statement_name (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ invalid_sql_statement_name()
| PQXX_ZARGS pqxx::invalid_sql_statement_name::invalid_sql_statement_name |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::invalid_sql_statement_name::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
◆ pqxx::invalid_cursor_name
| struct pqxx::invalid_cursor_name |
Public Member Functions |
| PQXX_ZARGS | invalid_cursor_name (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ invalid_cursor_name()
| PQXX_ZARGS pqxx::invalid_cursor_name::invalid_cursor_name |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::invalid_cursor_name::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
◆ pqxx::syntax_error
| struct pqxx::syntax_error |
Public Member Functions |
| PQXX_ZARGS | syntax_error (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, int pos=-1, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| constexpr int | error_pos () const noexcept |
| | Approximate position in statement where the error occurred, or -1. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
Public Attributes |
| int | error_position |
| |
◆ syntax_error()
| PQXX_ZARGS pqxx::syntax_error::syntax_error |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
int |
pos = -1, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ error_pos()
| constexpr int pqxx::syntax_error::error_pos |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Approximate position in statement where the error occurred, or -1.
The special value -1 is for cases where the error has no useful location in the SQL statement to indicate.
◆ name()
| std::string_view pqxx::syntax_error::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
Reimplemented in pqxx::undefined_table, pqxx::undefined_function, and pqxx::undefined_column.
◆ error_position
| int pqxx::syntax_error::error_position |
◆ pqxx::undefined_column
| struct pqxx::undefined_column |
Public Member Functions |
| PQXX_ZARGS | undefined_column (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | syntax_error (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, int pos=-1, sl loc=sl::current(), st &&tr=st::current()) |
| |
| constexpr int | error_pos () const noexcept |
| | Approximate position in statement where the error occurred, or -1. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ undefined_column()
| PQXX_ZARGS pqxx::undefined_column::undefined_column |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::undefined_column::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::syntax_error.
◆ pqxx::undefined_function
| struct pqxx::undefined_function |
Public Member Functions |
| PQXX_ZARGS | undefined_function (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | syntax_error (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, int pos=-1, sl loc=sl::current(), st &&tr=st::current()) |
| |
| constexpr int | error_pos () const noexcept |
| | Approximate position in statement where the error occurred, or -1. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ undefined_function()
| PQXX_ZARGS pqxx::undefined_function::undefined_function |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::undefined_function::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::syntax_error.
◆ pqxx::undefined_table
| struct pqxx::undefined_table |
Public Member Functions |
| PQXX_ZARGS | undefined_table (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | syntax_error (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, int pos=-1, sl loc=sl::current(), st &&tr=st::current()) |
| |
| constexpr int | error_pos () const noexcept |
| | Approximate position in statement where the error occurred, or -1. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ undefined_table()
| PQXX_ZARGS pqxx::undefined_table::undefined_table |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::undefined_table::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::syntax_error.
◆ pqxx::insufficient_privilege
| struct pqxx::insufficient_privilege |
Public Member Functions |
| PQXX_ZARGS | insufficient_privilege (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ insufficient_privilege()
| PQXX_ZARGS pqxx::insufficient_privilege::insufficient_privilege |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::insufficient_privilege::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
◆ pqxx::insufficient_resources
| struct pqxx::insufficient_resources |
Resource shortage on the server.
Public Member Functions |
| PQXX_ZARGS | insufficient_resources (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ insufficient_resources()
| PQXX_ZARGS pqxx::insufficient_resources::insufficient_resources |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::insufficient_resources::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
Reimplemented in pqxx::server_out_of_memory, and pqxx::disk_full.
◆ pqxx::disk_full
Public Member Functions |
| PQXX_ZARGS | disk_full (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | insufficient_resources (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ disk_full()
| PQXX_ZARGS pqxx::disk_full::disk_full |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::disk_full::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::insufficient_resources.
◆ pqxx::server_out_of_memory
| struct pqxx::server_out_of_memory |
Public Member Functions |
| PQXX_ZARGS | server_out_of_memory (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | insufficient_resources (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ server_out_of_memory()
| PQXX_ZARGS pqxx::server_out_of_memory::server_out_of_memory |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::server_out_of_memory::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::insufficient_resources.
◆ pqxx::too_many_connections
| struct pqxx::too_many_connections |
Public Member Functions |
| | too_many_connections (std::string const &err, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| | broken_connection (sl loc=sl::current(), st &&tr=st::current()) |
| |
| | broken_connection (std::string const &whatarg, sl loc=sl::current(), st &&tr=st::current()) |
| |
| bool | poisons_connection () const noexcept override |
| | By its nature, this type of error makes the connection unusable. More...
|
| |
| bool | poisons_transaction () const noexcept override |
| | When the connection breaks, so will an ongoing transaction. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
◆ too_many_connections()
| pqxx::too_many_connections::too_many_connections |
( |
std::string const & |
err, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::too_many_connections::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::broken_connection.
◆ pqxx::plpgsql_error
| struct pqxx::plpgsql_error |
PL/pgSQL error.
Exceptions derived from this class are errors from PL/pgSQL procedures.
Public Member Functions |
| PQXX_ZARGS | plpgsql_error (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ plpgsql_error()
| PQXX_ZARGS pqxx::plpgsql_error::plpgsql_error |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::plpgsql_error::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::sql_error.
Reimplemented in pqxx::plpgsql_too_many_rows, pqxx::plpgsql_no_data_found, and pqxx::plpgsql_raise.
◆ pqxx::plpgsql_raise
| struct pqxx::plpgsql_raise |
Exception raised in PL/pgSQL procedure.
Public Member Functions |
| PQXX_ZARGS | plpgsql_raise (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | plpgsql_error (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ plpgsql_raise()
| PQXX_ZARGS pqxx::plpgsql_raise::plpgsql_raise |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::plpgsql_raise::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::plpgsql_error.
◆ pqxx::plpgsql_no_data_found
| struct pqxx::plpgsql_no_data_found |
Public Member Functions |
| PQXX_ZARGS | plpgsql_no_data_found (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | plpgsql_error (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ plpgsql_no_data_found()
| PQXX_ZARGS pqxx::plpgsql_no_data_found::plpgsql_no_data_found |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::plpgsql_no_data_found::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::plpgsql_error.
◆ pqxx::plpgsql_too_many_rows
| struct pqxx::plpgsql_too_many_rows |
Public Member Functions |
| PQXX_ZARGS | plpgsql_too_many_rows (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| std::string_view | name () const noexcept override |
| | The name of this exception type: "failure", "sql_error", etc. More...
|
| |
| PQXX_ZARGS | plpgsql_error (std::string const &err, std::string const &Q={}, std::string const &sqlstate={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| PQXX_ZARGS | sql_error (std::string const &whatarg={}, std::string const &stmt={}, std::string const &sqls={}, sl loc=sl::current(), st &&tr=st::current()) |
| |
| | sql_error (sql_error const &other)=default |
| |
| | sql_error (sql_error &&other)=default |
| |
| | ~sql_error () override=default |
| |
| sql_error & | operator= (sql_error const &other)=default |
| |
| sql_error & | operator= (sql_error &&other)=default |
| |
| bool | poisons_transaction () const noexcept override |
| | If a transaction was ongoing, an SQL error will break it. More...
|
| |
| | failure (failure const &)=default |
| |
| | failure (failure &&)=default |
| |
| | failure (sl loc=sl::current(), st tr=st::current()) |
| |
| | failure (std::string whatarg, sl loc=sl::current(), st tr=st::current()) |
| |
| | ~failure () noexcept override |
| |
| failure & | operator= (failure const &)=default |
| |
| failure & | operator= (failure &&)=default |
| |
| PQXX_PURE char const * | what () const noexcept override |
| | Error message. More...
|
| |
| PQXX_PURE sl const & | location () const noexcept |
| | Best known std::source_location for where the error occurred. More...
|
| |
| PQXX_PURE std::shared_ptr< st const > | trace () const noexcept |
| | If available in this compiler, a std::stacktrace of this exception. More...
|
| |
| PQXX_PURE std::string_view | sqlstate () const noexcept |
| | SQLSTATE error code, or empty string if unavailable. More...
|
| |
| PQXX_PURE std::string_view | query () const noexcept |
| | SQL statement that encountered the error, if applicable; or empty string. More...
|
| |
| virtual bool | poisons_connection () const noexcept |
| | Does this type of error make the current connection unusable? More...
|
| |
◆ plpgsql_too_many_rows()
| PQXX_ZARGS pqxx::plpgsql_too_many_rows::plpgsql_too_many_rows |
( |
std::string const & |
err, |
|
|
std::string const & |
Q = {}, |
|
|
std::string const & |
sqlstate = {}, |
|
|
sl |
loc = sl::current(), |
|
|
st && |
tr = st::current() |
|
) |
| |
|
inlineexplicit |
◆ name()
| std::string_view pqxx::plpgsql_too_many_rows::name |
( |
| ) |
const |
|
overridevirtualnoexcept |
The name of this exception type: "failure", "sql_error", etc.
Do not count on this being exact, or eternal as libpqxx evolves. There can be mistakes, names may change, new exception subclasses show up during libpqxx development.
- Note
- If you need to check whether an exception you've caught is of a specific type, e.g.
pqxx::deadlock_detected, do not use name() for this, since its answer may change as libpqxx evolves. Instead, use something like:
try
{
}
{
if (deadlock == nullptr)
{
}
else
{
}
}
Reimplemented from pqxx::plpgsql_error.