Belle II Software development
SQLiteError Class Reference

Simple error class to be thrown if there is any sqlite error on any of the operations. More...

#include <sqlite.h>

Inheritance diagram for SQLiteError:

Public Member Functions

 SQLiteError (int code, const std::string &prefix="")
 Construct an instance from a prefix string and an sqlite error code.
 
int code () const
 Return the sqlite error code.
 

Private Attributes

int m_code
 SQLite error code.
 

Detailed Description

Simple error class to be thrown if there is any sqlite error on any of the operations.

Definition at line 36 of file sqlite.h.

Constructor & Destructor Documentation

◆ SQLiteError()

SQLiteError ( int  code,
const std::string &  prefix = "" 
)
inlineexplicit

Construct an instance from a prefix string and an sqlite error code.

Definition at line 39 of file sqlite.h.

39: std::runtime_error(prefix + sqlite3_errstr(code)), m_code(code) {}
int m_code
SQLite error code.
Definition: sqlite.h:43
int code() const
Return the sqlite error code.
Definition: sqlite.h:41

Member Function Documentation

◆ code()

int code ( ) const
inline

Return the sqlite error code.

Definition at line 41 of file sqlite.h.

41{ return m_code; }

Member Data Documentation

◆ m_code

int m_code
private

SQLite error code.

Definition at line 43 of file sqlite.h.


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