Kompex SQLite Wrapper  1.11.14
Public Member Functions | Private Attributes | List of all members
Kompex::SQLiteException Class Reference

Exception class for sqlite and KompexSQLiteWrapper errors. More...

#include <KompexSQLiteException.h>

Public Member Functions

 SQLiteException (const std::string &filename, unsigned int lineNumber, std::string errDescription="", int internalSqliteResultCode=-1)
 Overloaded constructor. More...
 
 SQLiteException (const std::string &filename, unsigned int lineNumber, const char *errDescription="", int internalSqliteResultCode=-1)
 Overloaded constructor. More...
 
void Show () const
 
std::string GetString () const
 Get all error information (filename, line, error message) as std::string. More...
 
std::string GetErrorDescription () const
 Returns an error description. More...
 
std::string GetFilename () const
 Returns the filename in which the error occured. More...
 
unsigned int GetLineNumber () const
 Returns the line number in which the error occured. More...
 
int GetSqliteResultCode () const
 

Private Attributes

std::string mErrorDescription
 Error description. More...
 
std::string mFilename
 Filename in which the error occured. More...
 
unsigned int mLineNumber
 Line number in which the error occured. More...
 
int mInternalSqliteResultCode
 Internal SQLite result code. More...
 

Detailed Description

Exception class for sqlite and KompexSQLiteWrapper errors.

Constructor & Destructor Documentation

Kompex::SQLiteException::SQLiteException ( const std::string &  filename,
unsigned int  lineNumber,
std::string  errDescription = "",
int  internalSqliteResultCode = -1 
)
inline

Overloaded constructor.

Kompex::SQLiteException::SQLiteException ( const std::string &  filename,
unsigned int  lineNumber,
const char *  errDescription = "",
int  internalSqliteResultCode = -1 
)
inline

Overloaded constructor.

Member Function Documentation

std::string Kompex::SQLiteException::GetErrorDescription ( ) const
inline

Returns an error description.

std::string Kompex::SQLiteException::GetFilename ( ) const
inline

Returns the filename in which the error occured.

unsigned int Kompex::SQLiteException::GetLineNumber ( ) const
inline

Returns the line number in which the error occured.

int Kompex::SQLiteException::GetSqliteResultCode ( ) const
inline

Returns the SQLite result code. It will also return extended result codes.
Please refer to the following links to see the existing codes.
SQLite Result Codes: http://sqlite.org/c3ref/c_abort.html
SQLite Extended Result Codes: http://sqlite.org/c3ref/c_abort_rollback.html
In case that this SQLiteWrapper will throw an own exception the result code will be -1.

std::string Kompex::SQLiteException::GetString ( ) const
inline

Get all error information (filename, line, error message) as std::string.

void Kompex::SQLiteException::Show ( ) const
inline

Shows all error information (filename, line, error message).
Output: std::cerr

Member Data Documentation

std::string Kompex::SQLiteException::mErrorDescription
private

Error description.

std::string Kompex::SQLiteException::mFilename
private

Filename in which the error occured.

int Kompex::SQLiteException::mInternalSqliteResultCode
private

Internal SQLite result code.

unsigned int Kompex::SQLiteException::mLineNumber
private

Line number in which the error occured.


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