Botan 3.13.0
Crypto and TLS for C&
Botan::SQL_Database::SQL_DB_Error Class Referencefinal

#include <database.h>

Inheritance diagram for Botan::SQL_Database::SQL_DB_Error:
Botan::Exception

Public Member Functions

int error_code () const noexcept override
ErrorType error_type () const noexcept override
 SQL_DB_Error (std::string_view what)
 SQL_DB_Error (std::string_view what, int rc)
const char * what () const noexcept override

Detailed Description

An error occurred while interacting with the database

Definition at line 31 of file database.h.

Constructor & Destructor Documentation

◆ SQL_DB_Error() [1/2]

Botan::SQL_Database::SQL_DB_Error::SQL_DB_Error ( std::string_view what)
inlineexplicit

Create a SQL_DB_Error

Parameters
whata description of the failure

Definition at line 37 of file database.h.

37: Exception("SQL database", what), m_rc(0) {}
const char * what() const noexcept override
Definition exceptn.h:94
Exception(std::string_view msg)
Definition exceptn.cpp:71

References Botan::Exception::Exception(), and Botan::Exception::what().

◆ SQL_DB_Error() [2/2]

Botan::SQL_Database::SQL_DB_Error::SQL_DB_Error ( std::string_view what,
int rc )
inline

Create a SQL_DB_Error

Parameters
whata description of the failure
rcthe database specific result code

Definition at line 44 of file database.h.

44: Exception("SQL database", what), m_rc(rc) {}

References Botan::Exception::Exception(), and Botan::Exception::what().

Member Function Documentation

◆ error_code()

int Botan::SQL_Database::SQL_DB_Error::error_code ( ) const
inlineoverridevirtualnoexcept

Return the database specific result code

Returns
the result code passed at construction, or 0

Reimplemented from Botan::Exception.

Definition at line 56 of file database.h.

56{ return m_rc; }

◆ error_type()

ErrorType Botan::SQL_Database::SQL_DB_Error::error_type ( ) const
inlineoverridevirtualnoexcept

Return the error type of this exception

Returns
the error type of this exception

Reimplemented from Botan::Exception.

Definition at line 50 of file database.h.

References Botan::DatabaseError.

◆ what()

const char * Botan::Exception::what ( ) const
inlineoverridenoexceptinherited

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