From 6b3d42b81f150ef383db98c11e7f50da136b5200 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 13 Oct 2022 21:52:16 -0700 Subject: [PATCH] Include exception in dictionary during debug --- BurnOutSharp/Scanner.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BurnOutSharp/Scanner.cs b/BurnOutSharp/Scanner.cs index 1b7427fd..7cc9af88 100644 --- a/BurnOutSharp/Scanner.cs +++ b/BurnOutSharp/Scanner.cs @@ -264,7 +264,7 @@ namespace BurnOutSharp if (IncludeDebug) Console.WriteLine(ex); var protections = new ConcurrentDictionary>(); - Utilities.AppendToDictionary(protections, file, "[Exception opening file, please try again]"); + Utilities.AppendToDictionary(protections, file, IncludeDebug ? ex.ToString() : "[Exception opening file, please try again]"); Utilities.ClearEmptyKeys(protections); return protections; } @@ -454,7 +454,7 @@ namespace BurnOutSharp { if (IncludeDebug) Console.WriteLine(ex); - Utilities.AppendToDictionary(protections, fileName, "[Exception opening file, please try again]"); + Utilities.AppendToDictionary(protections, fileName, IncludeDebug ? ex.ToString() : "[Exception opening file, please try again]"); } // Clear out any empty keys