diff --git a/src/util.cpp b/src/util.cpp index b667acc5e..8fbdfc65b 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -534,7 +534,7 @@ void ReadConfigFile(map& mapSettingsRet, { boost::filesystem::ifstream streamConfig(GetConfigFile()); if (!streamConfig.good()) - return; // No zcash.conf file is OK + throw missing_zcash_conf(); set setOptions; setOptions.insert("*"); diff --git a/src/util.h b/src/util.h index ef3a347fa..b7d255e4d 100644 --- a/src/util.h +++ b/src/util.h @@ -127,6 +127,10 @@ boost::filesystem::path GetConfigFile(); boost::filesystem::path GetPidFile(); void CreatePidFile(const boost::filesystem::path &path, pid_t pid); #endif +class missing_zcash_conf : public std::runtime_error { +public: + missing_zcash_conf() : std::runtime_error("Missing zcash.conf") { } +}; void ReadConfigFile(std::map& mapSettingsRet, std::map >& mapMultiSettingsRet); #ifdef WIN32 boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true);