summaryrefslogtreecommitdiff
path: root/src/lib/exceptions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/exceptions.cc')
-rw-r--r--src/lib/exceptions.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/exceptions.cc b/src/lib/exceptions.cc
index 27496dcdc..5f0fe935a 100644
--- a/src/lib/exceptions.cc
+++ b/src/lib/exceptions.cc
@@ -19,8 +19,9 @@
*/
-#include "exceptions.h"
#include "compose.hpp"
+#include "exceptions.h"
+#include "sqlite_database.h"
#include "i18n.h"
@@ -180,3 +181,13 @@ DiskFullError::DiskFullError(boost::filesystem::path writing)
}
+
+boost::filesystem::path
+SQLError::get_filename(SQLiteDatabase& db)
+{
+ if (auto filename = sqlite3_db_filename(db.db(), "main")) {
+ return filename;
+ }
+
+ return {};
+}