From d91aba20e2d8cda16cb999a3a86eefe6c00cf74f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81d=C3=A1m=20Kov=C3=A1cs?= Date: Wed, 15 Nov 2023 18:44:59 +0100 Subject: [PATCH] Reenable console EventLoop try-catch --- src/Library/TerminalUI/EventLoop.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Library/TerminalUI/EventLoop.cs b/src/Library/TerminalUI/EventLoop.cs index caef36c..74d9548 100644 --- a/src/Library/TerminalUI/EventLoop.cs +++ b/src/Library/TerminalUI/EventLoop.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.Logging; +using System.Diagnostics; +using Microsoft.Extensions.Logging; namespace TerminalUI; @@ -41,15 +42,15 @@ public class EventLoop(IApplicationContext applicationContext, { foreach (var action in _permanentQueue) { - /*try - {*/ - action(); - /*} + try + { + action(); + } catch (Exception e) { Debug.Fail(e.Message); _logger.LogError(e, "Error while processing action in permanent queue"); - }*/ + } } } } \ No newline at end of file