From 3591bd344d77fa85733cf0bdd80db8b102838bd8 Mon Sep 17 00:00:00 2001 From: Chris Punches Date: Sat, 24 Feb 2018 20:18:31 -0500 Subject: [PATCH] now shows where it looked for missing config file during initialisation --- src/loaders/Conf.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/loaders/Conf.cpp b/src/loaders/Conf.cpp index 37fe379..94e18ba 100644 --- a/src/loaders/Conf.cpp +++ b/src/loaders/Conf.cpp @@ -71,8 +71,14 @@ Conf::Conf( std::string filename, bool verbose ): JSON_Loader() // prepare context spaghetti 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) {