diff --git a/Application/ApplicationManager.cs b/Application/ApplicationManager.cs index d66308a71..0fbfe301e 100644 --- a/Application/ApplicationManager.cs +++ b/Application/ApplicationManager.cs @@ -412,7 +412,7 @@ namespace IW4MAdmin.Application if (!validationResult.IsValid) { - throw new ConfigurationException(_translationLookup["MANAGER_CONFIGURATION_ERROR"]) + throw new ConfigurationException("Could not validate configuration") { Errors = validationResult.Errors.Select(_error => _error.ErrorMessage).ToArray(), ConfigurationFileName = ConfigHandler.FileName diff --git a/Application/Main.cs b/Application/Main.cs index 432388738..b4cce2d41 100644 --- a/Application/Main.cs +++ b/Application/Main.cs @@ -18,6 +18,7 @@ using SharedLibraryCore.Repositories; using SharedLibraryCore.Services; using Stats.Dtos; using System; +using System.IO; using System.Linq; using System.Net.Http; using System.Text; @@ -138,11 +139,8 @@ namespace IW4MAdmin.Application if (e is ConfigurationException configException) { - if (translationLookup != null) - { - Console.WriteLine(translationLookup[configException.Message] - .FormatExt(configException.ConfigurationFileName)); - } + Console.WriteLine("{{fileName}} contains an error." + .FormatExt(Path.GetFileName(configException.ConfigurationFileName))); foreach (var error in configException.Errors) { diff --git a/Application/Misc/BaseConfigurationHandler.cs b/Application/Misc/BaseConfigurationHandler.cs index 84aca205c..dd64011b7 100644 --- a/Application/Misc/BaseConfigurationHandler.cs +++ b/Application/Misc/BaseConfigurationHandler.cs @@ -59,7 +59,7 @@ namespace IW4MAdmin.Application.Misc catch (Exception e) { - throw new ConfigurationException("MANAGER_CONFIGURATION_ERROR") + throw new ConfigurationException("Could not load configuration") { Errors = new[] { e.Message }, ConfigurationFileName = FileName