aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r--src/bitcoind.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 4882a00532..17aa0c9d4b 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -70,7 +70,13 @@ bool AppInit(int argc, char* argv[])
fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str());
return false;
}
- ReadConfigFile(mapArgs, mapMultiArgs);
+ try
+ {
+ ReadConfigFile(mapArgs, mapMultiArgs);
+ } catch(std::exception &e) {
+ fprintf(stderr,"Error reading configuration file: %s\n", e.what());
+ return false;
+ }
// Check for -testnet or -regtest parameter (TestNet() calls are only valid after this clause)
if (!SelectParamsFromCommandLine()) {
fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");