mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
fix: add error handling when saving debug settings
This commit is contained in:
@@ -957,6 +957,8 @@ public static class Debug
|
|||||||
//if (!Directory.Exists(dir))
|
//if (!Directory.Exists(dir))
|
||||||
// Directory.Create(dir);
|
// Directory.Create(dir);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
var fileName = GetMemoryFileName();
|
var fileName = GetMemoryFileName();
|
||||||
|
|
||||||
LogMessage(LogEventLevel.Information, "Loading debug settings file from {fileName}", fileName);
|
LogMessage(LogEventLevel.Information, "Loading debug settings file from {fileName}", fileName);
|
||||||
@@ -968,6 +970,13 @@ public static class Debug
|
|||||||
sw.Flush();
|
sw.Flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
ErrorLog.Error("Exception saving debug settings: {message}", ex);
|
||||||
|
CrestronConsole.PrintLine("Exception saving debug settings: {message}", ex.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user