Fixes #1167. Application.Run method with #DEBUG can be simplified. (#1168)

This commit is contained in:
BDisp
2021-04-02 19:54:22 +01:00
committed by GitHub
parent ad74a1429e
commit 11524630d3

View File

@@ -700,19 +700,15 @@ namespace Terminal.Gui {
public static void Run (Toplevel view, Func<Exception, bool> errorHandler = null)
{
var resume = true;
while (resume)
{
#if DEBUG
while (resume) {
#if !DEBUG
try {
#endif
resume = false;
var runToken = Begin (view);
RunLoop (runToken);
End (runToken);
#else
try {
resume = false;
var runToken = Begin (view);
RunLoop (runToken);
End (runToken);
#if !DEBUG
}
catch (Exception error)
{