Include exception in dictionary during debug

This commit is contained in:
Matt Nadareski
2022-10-13 21:52:16 -07:00
parent e645b8e1c0
commit 6b3d42b81f

View File

@@ -264,7 +264,7 @@ namespace BurnOutSharp
if (IncludeDebug) Console.WriteLine(ex);
var protections = new ConcurrentDictionary<string, ConcurrentQueue<string>>();
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