userver: userver/storages/postgres/exceptions.hpp File Reference
Loading...
Searching...
No Matches
exceptions.hpp File Reference

Detailed Description

Postgres errors.

Definition in file exceptions.hpp.

Go to the source code of this file.

#include <stdexcept>
#include <string_view>
#include <fmt/format.h>
#include <userver/storages/postgres/dsn.hpp>
#include <userver/storages/postgres/io/traits.hpp>
#include <userver/storages/postgres/message.hpp>
#include <userver/compiler/demangle.hpp>
#include <userver/utils/underlying_value.hpp>
+ Include dependency graph for exceptions.hpp:
+ This graph shows which files directly or indirectly include this file:

Classes

class  storages::postgres::Error
 Base class for all exceptions that may be thrown by the driver. More...
 
class  storages::postgres::LogicError
 Base Postgres logic error. Reports errors that are consequences of erroneous driver usage, such as invalid query syntax, absence of appropriate parsers, out of range errors etc. These can be avoided by fixing code. More...
 
class  storages::postgres::RuntimeError
 Base Postgres runtime error. Reports errors that are consequences of erroneous data, misconfiguration, network errors etc. More...
 
class  storages::postgres::ServerError< Base >
 Error that was reported by PosgtreSQL server Contains the message sent by the server. Templated class because the errors can be both runtime and logic. More...
 
class  storages::postgres::ConnectionError
 
class  storages::postgres::ConnectionFailed
 Exception is thrown when a single connection fails to connect. More...
 
class  storages::postgres::ServerConnectionError
 Connection error reported by PostgreSQL server. Doc: https://www.postgresql.org/docs/12/static/errcodes-appendix.html Class 08 - Connection exception. More...
 
class  storages::postgres::PoolError
 Indicates errors during pool operation. More...
 
class  storages::postgres::ClusterUnavailable
 
class  storages::postgres::CommandError
 Error when invoking a libpq function. More...
 
class  storages::postgres::ConnectionTimeoutError
 A network operation on a connection has timed out. More...
 
class  storages::postgres::ClusterError
 
class  storages::postgres::ConnectionBusy
 An attempt to make a query to server was made while there is another query in flight. More...
 
class  storages::postgres::ConnectionInterrupted
 A network operation was interrupted by task cancellation. More...
 
class  storages::postgres::SqlStatementNotYetComplete
 
class  storages::postgres::TriggeredActionException
 
class  storages::postgres::FeatureNotSupported
 
class  storages::postgres::LocatorException
 
class  storages::postgres::InvalidGrantor
 
class  storages::postgres::InvalidRoleSpecification
 
class  storages::postgres::DiagnosticsException
 
class  storages::postgres::CardinalityViolation
 
class  storages::postgres::DataException
 Base class for data exceptions Doc: https://www.postgresql.org/docs/12/static/errcodes-appendix.html. More...
 
class  storages::postgres::IntegrityConstraintViolation
 Base class for integrity constraint violation errors. Doc: https://www.postgresql.org/docs/12/static/errcodes-appendix.html. More...
 
class  storages::postgres::RestrictViolation
 
class  storages::postgres::NotNullViolation
 
class  storages::postgres::ForeignKeyViolation
 
class  storages::postgres::UniqueViolation
 
class  storages::postgres::CheckViolation
 
class  storages::postgres::ExclusionViolation
 
class  storages::postgres::TriggeredDataChangeViolation
 Class 27 - Triggered Data Change Violation. More...
 
class  storages::postgres::WithCheckOptionViolation
 Class 44 - WITH CHECK OPTION Violation. More...
 
class  storages::postgres::InvalidCursorState
 
class  storages::postgres::InvalidTransactionState
 
class  storages::postgres::InvalidSqlStatementName
 This exception is thrown in case a prepared statement doesn't exist. More...
 
class  storages::postgres::InvalidObjectName
 Exception class for several Invalid * Name classes. Class 34 - Invalid Cursor Name Class 3D - Invalid Catalogue Name Class 3F - Invalid Schema Name TODO Add documentation (links) on the error classes TODO Split exception classes if needed based on documentation. More...
 
class  storages::postgres::InvalidAuthorizationSpecification
 
class  storages::postgres::DependentPrivilegeDescriptorsStillExist
 
class  storages::postgres::InvalidTransactionTermination
 
class  storages::postgres::ExternalRoutineException
 
class  storages::postgres::ExternalRoutineInvocationException
 
class  storages::postgres::SavepointException
 
class  storages::postgres::SqlRoutineException
 
class  storages::postgres::TransactionRollback
 
class  storages::postgres::SyntaxError
 
class  storages::postgres::AccessRuleViolation
 
class  storages::postgres::DuplicatePreparedStatement
 
class  storages::postgres::InsufficientResources
 
class  storages::postgres::ProgramLimitExceeded
 
class  storages::postgres::ObjectNotInPrerequisiteState
 
class  storages::postgres::OperatorIntervention
 
class  storages::postgres::QueryCancelled
 
class  storages::postgres::AdminShutdown
 
class  storages::postgres::CrashShutdown
 
class  storages::postgres::CannotConnectNow
 
class  storages::postgres::DatabaseDropped
 
class  storages::postgres::SystemError
 
class  storages::postgres::SnapshotFailure
 
class  storages::postgres::ConfigurationFileError
 
class  storages::postgres::FdwError
 
class  storages::postgres::PlPgSqlError
 
class  storages::postgres::InternalServerError
 
class  storages::postgres::TransactionError
 
class  storages::postgres::AlreadyInTransaction
 
class  storages::postgres::NotInTransaction
 
class  storages::postgres::TransactionForceRollback
 
class  storages::postgres::ResultSetError
 
class  storages::postgres::RowIndexOutOfBounds
 Result set has less rows than the requested row index. More...
 
class  storages::postgres::FieldIndexOutOfBounds
 Result set has less columns that the requested index. More...
 
class  storages::postgres::FieldNameDoesntExist
 Result set doesn't have field with the requested name. More...
 
class  storages::postgres::FieldValueIsNull
 Data extraction from a null field value to a non-nullable type requested. More...
 
class  storages::postgres::TypeCannotBeNull
 A value of a non-nullable type requested to be set null. Can occur if io::traits::IsNullable for the type is specialised as true_type, but io::traits::GetSetNull is not specialized appropriately. More...
 
class  storages::postgres::InvalidParserCategory
 Field buffer contains different category of data than expected by data parser. More...
 
class  storages::postgres::UnknownBufferCategory
 While checking result set types, failed to determine the buffer category for a type oid. The context string is formed by the ResultSet and will have the form of 'result set field foo type my_schema.bar field baz array element'. More...
 
class  storages::postgres::NoBinaryParser
 A field in a result set doesn't have a binary parser. More...
 
class  storages::postgres::InvalidInputBufferSize
 Buffer size is invalid for a fixed-size type. Can occur when a wrong field type is requested for reply. More...
 
class  storages::postgres::InvalidBinaryBuffer
 Binary buffer contains invalid data. Can occur when parsing binary buffers containing multiple fields. More...
 
class  storages::postgres::InvalidTupleSizeRequested
 A tuple was requested to be parsed out of a row that doesn't have enough fields. More...
 
class  storages::postgres::NonSingleColumnResultSet
 A row or result set requested to be treated as a single column, but contains more than one column. More...
 
class  storages::postgres::NonSingleRowResultSet
 A result set containing a single row was expected. More...
 
class  storages::postgres::FieldTupleMismatch
 A row was requested to be parsed based on field names/indexed, the count of names/indexes doesn't match the tuple size. More...
 
class  storages::postgres::UserTypeError
 Base error when working with mapped types. More...
 
class  storages::postgres::CompositeSizeMismatch
 PostgreSQL composite type has different count of members from the C++ counterpart. More...
 
class  storages::postgres::CompositeMemberTypeMismatch
 PostgreSQL composite type has different member type that the C++ mapping suggests. More...
 
class  storages::postgres::ArrayError
 Base error when working with array types. More...
 
class  storages::postgres::DimensionMismatch
 Array received from postgres has different dimensions from those of C++ container. More...
 
class  storages::postgres::InvalidDimensions
 
class  storages::postgres::NumericError
 
class  storages::postgres::NumericOverflow
 Value in PostgreSQL binary buffer cannot be represented by a given C++ type. More...
 
class  storages::postgres::ValueIsNaN
 
class  storages::postgres::InvalidRepresentation
 Integral representation for a numeric contains invalid data. More...
 
class  storages::postgres::InvalidInputFormat
 Invalid format for input data. More...
 
class  storages::postgres::EnumerationError
 
class  storages::postgres::InvalidEnumerationLiteral
 
class  storages::postgres::InvalidEnumerationValue
 
class  storages::postgres::UnsupportedInterval
 
class  storages::postgres::BoundedRangeError
 PostgreSQL range type has at least one end unbound. More...
 
class  storages::postgres::BitStringError
 Base error when working with bit string types. More...
 
class  storages::postgres::BitStringOverflow
 Value in PostgreSQL binary buffer cannot be represented by a given C++ type. More...
 
class  storages::postgres::InvalidBitStringRepresentation
 Value in PostgreSQL binary buffer cannot be represented as bit string type. More...
 
class  storages::postgres::InvalidDSN
 
class  storages::postgres::InvalidConfig
 
class  storages::postgres::NotImplemented
 
class  storages::postgres::IpAddressError
 
class  storages::postgres::IpAddressInvalidFormat
 

Namespaces

namespace  storages
 Components, clients and helpers for different databases and storages.
 
namespace  storages::postgres
 Top namespace for uPg driver.
 

Typedefs

Generic driver errors
using storages::postgres::ServerLogicError = ServerError<LogicError>
 
using storages::postgres::ServerRuntimeError = ServerError<RuntimeError>