libsl3  1.12.2
C++ interface for sqlite3
Public Member Functions | List of all members
sl3::ErrType< ErrCode::SQL3Error > Class Template 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)
 c'tor More...
 
 ErrType (int sl3ec, const char *sl3msg, const std::string &msg)
 c'tor More...
 
ErrCode getId () const override
 Get ErrCode. More...
 
int SQLiteErrorCode () const
 Get the sqlite3 error code. More...
 
const std::string & SQLiteErrorMessage () const
 Get the sqlite3 error message. More...
 

Detailed Description

template<>
class sl3::ErrType< ErrCode::SQL3Error >

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 
)
inline

c'tor

Parameters
sl3ecsqite error code
sl3msgsqite error code

◆ ErrType() [2/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

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: