From a02531a16c07142a5184fc354bb9f921c069a101 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 15 Nov 2016 11:06:11 +0100 Subject: [PATCH] Better errors during config load --- src/NadekoBot/Services/Impl/BotCredentials.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Services/Impl/BotCredentials.cs b/src/NadekoBot/Services/Impl/BotCredentials.cs index 6f0463b5..d1d0d1d4 100644 --- a/src/NadekoBot/Services/Impl/BotCredentials.cs +++ b/src/NadekoBot/Services/Impl/BotCredentials.cs @@ -44,7 +44,7 @@ namespace NadekoBot.Services.Impl try { var configBuilder = new ConfigurationBuilder(); - configBuilder.AddJsonFile(credsFileName) + configBuilder.AddJsonFile(credsFileName, true) .AddEnvironmentVariables("NadekoBot_"); var data = configBuilder.Build(); @@ -78,7 +78,8 @@ namespace NadekoBot.Services.Impl } catch (Exception ex) { - _log.Warn(ex); + _log.Fatal(ex.Message); + _log.Fatal(ex); throw; }