Better errors during config load

This commit is contained in:
Kwoth 2016-11-15 11:06:11 +01:00
parent bd0b668c0d
commit a02531a16c

View File

@ -44,7 +44,7 @@ namespace NadekoBot.Services.Impl
try try
{ {
var configBuilder = new ConfigurationBuilder(); var configBuilder = new ConfigurationBuilder();
configBuilder.AddJsonFile(credsFileName) configBuilder.AddJsonFile(credsFileName, true)
.AddEnvironmentVariables("NadekoBot_"); .AddEnvironmentVariables("NadekoBot_");
var data = configBuilder.Build(); var data = configBuilder.Build();
@ -78,7 +78,8 @@ namespace NadekoBot.Services.Impl
} }
catch (Exception ex) catch (Exception ex)
{ {
_log.Warn(ex); _log.Fatal(ex.Message);
_log.Fatal(ex);
throw; throw;
} }