libsl3 1.2.41002
A C++ interface for SQLite
Loading...
Searching...
No Matches
Public Member Functions | List of all members
sl3::ErrType< ErrCode::SQL3Error > Class Referencefinal

packaging an error from sqlite3. This exception will be thrown if sqlite3 reports an error. More...

#include <sl3/error.hpp>

Inheritance diagram for sl3::ErrType< ErrCode::SQL3Error >:
sl3::Error

Public Member Functions

 ErrType (int sl3ec, const char *sl3msg, const std::string &msg)
 c'tor
 
 ErrType (int sl3ec, const char *sl3msg)
 c'tor
 
ErrCode getId () const override
 Get ErrCode.
 
int SQLiteErrorCode () const
 Get the sqlite3 error code.
 
const std::string & SQLiteErrorMessage () const
 Get the sqlite3 error message.
 
virtual ErrCode getId () const =0
 Get ErrCode.
 

Detailed Description

packaging an error from sqlite3. This exception will be thrown if sqlite3 reports an error.

Holds the sqlite3 error code and the error message if it is available.

See also
Database::getMostRecentErrMsg
Database::getMostRecentErrCode


Extended error codes can be obtained through Database class.

See also
Database::getMostRecentExtendedErrCode
Database::enableExtendedResultCodes

Constructor & Destructor Documentation

◆ ErrType() [1/2]

sl3::ErrType< ErrCode::SQL3Error >::ErrType ( int  sl3ec,
const char *  sl3msg,
const std::string &  msg 
)
inline

c'tor

Parameters
sl3ecsqite error code
sl3msgsqite error code
msgadditional message

◆ ErrType() [2/2]

sl3::ErrType< ErrCode::SQL3Error >::ErrType ( int  sl3ec,
const char *  sl3msg 
)
inline

c'tor

Parameters
sl3ecsqite error code
sl3msgsqite error code

Member Function Documentation

◆ getId()

ErrCode sl3::ErrType< ErrCode::SQL3Error >::getId ( ) const
inlineoverridevirtual

Get ErrCode.

Returns
the Errcode of the excetion

Implements sl3::Error.

◆ SQLiteErrorCode()

int sl3::ErrType< ErrCode::SQL3Error >::SQLiteErrorCode ( ) const
inline

Get the sqlite3 error code.

Returns
the sqlite3 error code

◆ SQLiteErrorMessage()

const std::string & sl3::ErrType< ErrCode::SQL3Error >::SQLiteErrorMessage ( ) const
inline

Get the sqlite3 error message.

If the exception was created with a sqlite a error message it can be accessed here.

Returns
the sqlite3 error message

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