19 #ifndef KompexSQLiteException_H
20 #define KompexSQLiteException_H
35 SQLiteException(
const std::string &filename,
unsigned int line, std::string errDescription =
""):
36 mErrorDescription(errDescription),
43 SQLiteException(
const std::string &filename,
unsigned int line,
const char *errDescription =
""):
44 mErrorDescription(std::string(errDescription)),
52 inline void Show()
const {std::cerr <<
"file: " << mFilename <<
"\nline: " << mLine <<
"\nerror: " << mErrorDescription << std::endl;}
54 std::string GetString()
const
56 std::stringstream strStream;
57 strStream <<
"file: " << mFilename <<
"\nline: " << mLine <<
"\nerror: " << std::string(mErrorDescription) <<
"\n";
58 return strStream.str();
71 #endif // KompexSQLiteException_H
74 #define KOMPEX_EXCEPT(errorString) throw SQLiteException(__FILE__, __LINE__, errorString)