fb-cpp 0.0.2
A modern C++ wrapper for the Firebird database API
Loading...
Searching...
No Matches
fbcpp::DatabaseException Class Referencefinal

Exception thrown when a Firebird database operation fails. More...

#include <Exception.h>

Inheritance diagram for fbcpp::DatabaseException:
Collaboration diagram for fbcpp::DatabaseException:

Public Member Functions

 DatabaseException (Client &client, const std::intptr_t *statusVector)
 Constructs a DatabaseException from a Firebird status vector.
 
 DatabaseException (const DatabaseException &other)
 
 DatabaseException (DatabaseException &&)=default
 
DatabaseExceptionoperator= (const DatabaseException &)=delete
 
DatabaseExceptionoperator= (DatabaseException &&)=delete
 
const std::vector< std::intptr_t > & getErrors () const noexcept
 Returns the Firebird error vector.
 
std::intptr_t getErrorCode () const noexcept
 Returns the primary ISC error code (first isc_arg_gds value), or 0 if none.
 
const std::string & getSqlState () const noexcept
 Returns the SQL state string (e.g.
 
- Public Member Functions inherited from fbcpp::FbCppException
 FbCppException (const std::string &message)
 Constructs an FbCppException with the specified error message.
 

Detailed Description

Exception thrown when a Firebird database operation fails.

Definition at line 200 of file Exception.h.

Constructor & Destructor Documentation

◆ DatabaseException() [1/2]

fbcpp::DatabaseException::DatabaseException ( Client client,
const std::intptr_t *  statusVector 
)
inlineexplicit

Constructs a DatabaseException from a Firebird status vector.

Definition at line 206 of file Exception.h.

◆ DatabaseException() [2/2]

fbcpp::DatabaseException::DatabaseException ( const DatabaseException other)
inline

Definition at line 213 of file Exception.h.

Member Function Documentation

◆ getErrorCode()

std::intptr_t fbcpp::DatabaseException::getErrorCode ( ) const
inlinenoexcept

Returns the primary ISC error code (first isc_arg_gds value), or 0 if none.

Definition at line 239 of file Exception.h.

◆ getErrors()

const std::vector< std::intptr_t > & fbcpp::DatabaseException::getErrors ( ) const
inlinenoexcept

Returns the Firebird error vector.

The vector is terminated by isc_arg_end.

Definition at line 231 of file Exception.h.

◆ getSqlState()

const std::string & fbcpp::DatabaseException::getSqlState ( ) const
inlinenoexcept

Returns the SQL state string (e.g.

"42000") if present in the original status vector, or empty otherwise.

Definition at line 250 of file Exception.h.


The documentation for this class was generated from the following files: