From f170f16919708908d61f1ae77f7aa664056bb825 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sat, 11 Jun 2016 03:39:25 +0200 Subject: [PATCH] Catch SendAsync() exception when debugging --- ArchiSteamFarm/WebBrowser.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/WebBrowser.cs b/ArchiSteamFarm/WebBrowser.cs index 3f0119ffc..20c7b29b9 100644 --- a/ArchiSteamFarm/WebBrowser.cs +++ b/ArchiSteamFarm/WebBrowser.cs @@ -413,7 +413,12 @@ namespace ArchiSteamFarm { try { responseMessage = await HttpClient.SendAsync(requestMessage).ConfigureAwait(false); - } catch { // Request failed, we don't need to know the exact reason, swallow exception + } catch (Exception e) { + // This exception is really common, don't bother with it unless debug mode is enabled + if (Debugging.IsDebugBuild || Program.GlobalConfig.Debug) { + Logging.LogGenericException(e, Identifier); + } + return null; } }