From 8d6678009abce4e409e8695004bdb76c094c5de5 Mon Sep 17 00:00:00 2001 From: Albert S Date: Mon, 24 Aug 2020 21:36:19 +0200 Subject: [PATCH] sqlitedbservice: provide error message with more context --- cli/sqlitedbservice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/sqlitedbservice.cpp b/cli/sqlitedbservice.cpp index 5cc0fe5..2f0de8d 100644 --- a/cli/sqlitedbservice.cpp +++ b/cli/sqlitedbservice.cpp @@ -12,7 +12,7 @@ bool SqliteDbService::fileExistsInDatabase(QString path, qint64 mtime) query.addBindValue(mtime); if(!query.exec()) { - throw QSSGeneralException("Error while trying to query for file existance"); + throw QSSGeneralException("Error while trying to query for file existance: " + query.lastError().text()); } if(!query.next()) { @@ -35,7 +35,7 @@ bool SqliteDbService::fileExistsInDatabase(QString path) query.addBindValue(path); if(!query.exec()) { - throw QSSGeneralException("Error while trying to query for file existance"); + throw QSSGeneralException("Error while trying to query for file existance: " + query.lastError().text()); } if(!query.next()) {