diff --git a/components/common/cpp/src/configuration.cpp b/components/common/cpp/src/configuration.cpp index 327bfd03ba7585b7b2efd6120f9b79eb15422422..607d171cf9703d11b6a34339f8aff267e5f2b681 100644 --- a/components/common/cpp/src/configuration.cpp +++ b/components/common/cpp/src/configuration.cpp @@ -867,10 +867,16 @@ Configurable *ftl::config::configure(int argc, char **argv, const std::string &r config_restore = std::move(ftl::loadJSON(std::string(FTL_LOCAL_CONFIG_ROOT "/")+cfg_root_str+std::string("_session.json"))); - Configurable *rootcfg = create<Configurable>(config); - if (root_str.size() > 0) { - LOG(INFO) << "Setting root to " << root_str; - rootcfg = create<Configurable>(rootcfg, root_str); + Configurable *rootcfg = nullptr; + + try { + rootcfg = create<Configurable>(config); + if (root_str.size() > 0) { + LOG(INFO) << "Setting root to " << root_str; + rootcfg = create<Configurable>(rootcfg, root_str); + } + } catch (const std::exception &e) { + LOG(FATAL) << "Exception setting root: " << e.what(); } //root_config = rootcfg->getConfig();