diff --git a/src/pEpSQLite.cc b/src/pEpSQLite.cc index 182a9d4..6e88022 100644 --- a/src/pEpSQLite.cc +++ b/src/pEpSQLite.cc @@ -40,8 +40,8 @@ namespace pEp { void pEpSQLite::delete_db() { pEpLogClass("called"); - remove(db_path.c_str()); - if (errno) { + int status = remove(db_path.c_str()); + if (status) { runtime_error e{string("could not delete db (" + db_path + "): " + strerror(errno))}; throw (e); }