Throw an error if zcash.conf is missing

An empty zcash.conf is sufficient to bypass this error.
This commit is contained in:
Jack Grigg
2017-01-10 16:33:41 +01:00
parent f3a4dae63a
commit d87f00c4d5
2 changed files with 5 additions and 1 deletions

View File

@@ -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<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet);
#ifdef WIN32
boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true);