aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index d8e21c4aa6..696e65ec19 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -25,7 +25,9 @@
#include "rpcserver.h"
#include "ui_interface.h"
#include "util.h"
+#ifdef ENABLE_WALLET
#include "wallet.h"
+#endif
#include <stdint.h>
@@ -505,7 +507,13 @@ int main(int argc, char *argv[])
QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
return 1;
}
- ReadConfigFile(mapArgs, mapMultiArgs);
+ try {
+ ReadConfigFile(mapArgs, mapMultiArgs);
+ } catch(std::exception &e) {
+ QMessageBox::critical(0, QObject::tr("Bitcoin"),
+ QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what()));
+ return false;
+ }
/// 7. Determine network (and switch to network specific options)
// - Do not call Params() before this step