aboutsummaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/db')
-rw-r--r--src/db/Configured.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/db/Configured.cxx b/src/db/Configured.cxx
index 0cec7efd0..a6194dc5c 100644
--- a/src/db/Configured.cxx
+++ b/src/db/Configured.cxx
@@ -23,6 +23,7 @@
#include "config/ConfigGlobal.hxx"
#include "config/ConfigData.hxx"
#include "config/ConfigError.hxx"
+#include "util/Error.hxx"
#include "Log.hxx"
Database *
@@ -32,9 +33,12 @@ CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
const struct config_param *param = config_get_param(CONF_DATABASE);
const struct config_param *path = config_get_param(CONF_DB_FILE);
- if (param != nullptr && path != nullptr)
- LogWarning(config_domain,
- "Found both 'database' and 'db_file' setting - ignoring the latter");
+ if (param != nullptr && path != nullptr) {
+ error.Format(config_domain,
+ "Found both 'database' (line %d) and 'db_file' (line %d) setting",
+ param->line, path->line);
+ return nullptr;
+ }
if (!have_storage) {
if (param != nullptr)