[fxcop] Settings UI runner (#7485)

* Enable FxCop for Microsoft.PowerToys.Settings.UI.Runner

* Log exceptions in WindowsXamlHost_ChildChanged

* Add Debugger.Break in debug mode

* Move Debugger.Break into Logger class
This commit is contained in:
Luthfi Mawarid
2020-10-26 11:09:18 -07:00
committed by GitHub
parent ec22bc40bc
commit 39ebd82e20
4 changed files with 24 additions and 6 deletions

View File

@@ -32,6 +32,14 @@ namespace Microsoft.PowerToys.Settings.UI.Library.Utilities
Log(message, "INFO");
}
public static void LogError(string message)
{
Log(message, "ERROR");
#if DEBUG
Debugger.Break();
#endif
}
public static void LogError(string message, Exception e)
{
Log(
@@ -42,6 +50,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library.Utilities
"Stack trace: " + Environment.NewLine +
e?.StackTrace,
"ERROR");
#if DEBUG
Debugger.Break();
#endif
}
private static void Log(string message, string type)