now shows where it looked for missing config file during initialisation

master
Chris Punches 2018-02-24 20:18:31 -05:00
parent 1c354b4401
commit 3591bd344d
1 changed files with 8 additions and 2 deletions

View File

@ -71,8 +71,14 @@ Conf::Conf( std::string filename, bool verbose ): JSON_Loader()
// prepare context spaghetti // prepare context spaghetti
this->override_context = false; this->override_context = false;
// load the conf file.
this->load_json_file( filename, verbose ); try {
// load the conf file.
this->load_json_file( filename, verbose );
}
catch (std::exception) {
throw ConfigLoadException("Could not find '" + filename + "'.");
}
if (this->get_serialized(this->config_version, "config_version" ,true) != 0) if (this->get_serialized(this->config_version, "config_version" ,true) != 0)
{ {