libimgdoc2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
imgdoc2::database_exception Class Reference

Exception for signalling database errors. More...

#include <exceptions.h>

Inheritance diagram for imgdoc2::database_exception:
imgdoc2::imgdoc2_exception

Public Member Functions

 database_exception (const char *error_message)
 
 database_exception (const char *error_message, int sqlite_error_code)
 
bool GetIsSqliteErrorCodeValid () const
 
int GetSqliteErrorCode () const
 
std::string GetSqliteErrorMessage () const
 
- Public Member Functions inherited from imgdoc2::imgdoc2_exception
 imgdoc2_exception (const char *error_message)
 

Detailed Description

Exception for signalling database errors.

Constructor & Destructor Documentation

◆ database_exception() [1/2]

imgdoc2::database_exception::database_exception ( const char *  error_message)
inlineexplicit

Constructor.

Parameters
error_messageMessage describing the error.

◆ database_exception() [2/2]

imgdoc2::database_exception::database_exception ( const char *  error_message,
int  sqlite_error_code 
)
inlineexplicit

Constructor.

Parameters
error_messageMessage describing the error.
sqlite_error_codeThe SQLite error code.

Member Function Documentation

◆ GetIsSqliteErrorCodeValid()

bool imgdoc2::database_exception::GetIsSqliteErrorCodeValid ( ) const
inline

Gets a boolean indicating whether the SQLite error code is valid.

Returns
True if the SQLite error code is valid; false otherwise.

◆ GetSqliteErrorCode()

int imgdoc2::database_exception::GetSqliteErrorCode ( ) const
inline

Gets the SQLite error code. Call database_exception::GetIsSqliteErrorCodeValid() in order to test whether the error code is valid.

Returns
The sqlite error code.

◆ GetSqliteErrorMessage()

std::string imgdoc2::database_exception::GetSqliteErrorMessage ( ) const

Gets the SQLite provided error message for the error code. The result is unspecified if the error code is not valid.

Returns
The SQLite provided error message.

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