|
|
@ -47,11 +47,7 @@ namespace pEp { |
|
|
|
|
|
|
|
bool pEpSQLite::is_open() const |
|
|
|
{ |
|
|
|
if (db == nullptr) { |
|
|
|
return false; |
|
|
|
} else { |
|
|
|
return true; |
|
|
|
} |
|
|
|
return db; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -85,7 +81,8 @@ namespace pEp { |
|
|
|
if (!is_open()) { |
|
|
|
DBNotOpenException e{ "pEpSQLite: execute() failed - db is not open:" }; |
|
|
|
throw(e); |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
pEpLogClass("called"); |
|
|
|
this->resultset.clear(); |
|
|
|
char *zErrMsg = nullptr; |
|
|
@ -102,12 +99,11 @@ namespace pEp { |
|
|
|
::sqlite3_free(zErrMsg); |
|
|
|
throw(e); |
|
|
|
} |
|
|
|
runtime_error e{ "pEpSQLite: execute() failed with sqlite error: " + |
|
|
|
std::to_string(rc) + " - " + string(zErrMsg) }; |
|
|
|
runtime_error e{ "pEpSQLite: execute() failed with sqlite error: " + std::to_string(rc) + |
|
|
|
" - " + string(zErrMsg) }; |
|
|
|
::sqlite3_free(zErrMsg); |
|
|
|
throw(e); |
|
|
|
} |
|
|
|
} |
|
|
|
return resultset; |
|
|
|
} |
|
|
|
|
|
|
|