From ba21ad5b52d75c98d15a547a64d246e576c1afc2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Mar 2017 22:55:19 +0300 Subject: Show asserts if any errors happened with fopen. --- src/configmanager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/configmanager.cpp') diff --git a/src/configmanager.cpp b/src/configmanager.cpp index bd19d7307..e79753a66 100644 --- a/src/configmanager.cpp +++ b/src/configmanager.cpp @@ -34,6 +34,7 @@ #include "fs/mkdir.h" #include "fs/paths.h" +#include "utils/checkutils.h" #include "utils/gettext.h" #include "render/renderers.h" @@ -76,6 +77,11 @@ void ConfigManager::initServerConfig(const std::string &serverName) serverConfig.setDefaultValues(getConfigDefaults()); logger->log("serverConfigPath: " + configPath); } + else + { + reportAlways("Error creating server config: %s", + configPath.c_str()); + } const bool val = client->isTmw(); setDefaultOption("enableManaMarketBot", val); @@ -135,7 +141,7 @@ void ConfigManager::initConfiguration() } if (!configFile) { - logger->log("Can't create %s. Using defaults.", + reportAlways("Can't create %s. Using defaults.", configPath.c_str()); } else -- cgit v1.2.3-70-g09d2