sqlitepp
C++ binding for the SQLite3 library
Public Member Functions | List of all members
sqlitepp::DatabaseError Class Reference

An error that occurred during a database operation. More...

#include <sqlitepp/sqlitepp.h>

Inheritance diagram for sqlitepp::DatabaseError:
Inheritance graph
[legend]
Collaboration diagram for sqlitepp::DatabaseError:
Collaboration graph
[legend]

Public Member Functions

 DatabaseError (const int errorCode)
 Creates a new DatabaseError with the given code and the default message. More...
 
 DatabaseError (const int errorCode, const std::string &errorMessage)
 Creates a new DatabaseError with the given code and message. More...
 
int errorCode () const
 Returns the SQLite3 error code for this error. More...
 

Detailed Description

An error that occurred during a database operation.

This error class is only used for errors that occured in the SQLite3 library and that are related to database operations. If there are other problems, for example wrong states or illegal arguments, appropriate other exceptions are thrown.

This exception class stores the SQLite3 error code and the error message.

See also
SQLite Result Codes

Constructor & Destructor Documentation

◆ DatabaseError() [1/2]

sqlitepp::DatabaseError::DatabaseError ( const int  errorCode)
explicit

Creates a new DatabaseError with the given code and the default message.

The message is retrieved from the default SQLite3 error messages.

Parameters
errorCodethe SQLite3 error code
See also
SQLite Result Codes

◆ DatabaseError() [2/2]

sqlitepp::DatabaseError::DatabaseError ( const int  errorCode,
const std::string &  errorMessage 
)

Creates a new DatabaseError with the given code and message.

Parameters
errorCodethe SQLite3 error code
errorMessagethe according error message
See also
SQLite Result Codes

Member Function Documentation

◆ errorCode()

int sqlitepp::DatabaseError::errorCode ( ) const

Returns the SQLite3 error code for this error.

See also
SQLite Result Codes

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