From 325b1a14412f35cb3a571e31f27c03130f7980d1 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Mon, 28 Jul 2025 18:47:18 -0500 Subject: [PATCH] CmdPal: Remove vestigial try/catch (#40815) This was added in #38040 but appears to be vestigial now. RE: #40113 --- .../Microsoft.CmdPal.UI/Controls/ContentIcon.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/ContentIcon.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/ContentIcon.cs index 1e12b12ebd..1c4945d131 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/ContentIcon.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/ContentIcon.cs @@ -2,9 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Runtime.InteropServices; using CommunityToolkit.WinUI; -using ManagedCommon; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; @@ -37,14 +35,7 @@ public partial class ContentIcon : FontIcon { if (this.FindDescendants().OfType().FirstOrDefault() is Grid grid && Content is not null) { - try - { - grid.Children.Add(Content); - } - catch (COMException ex) - { - Logger.LogError(ex.ToString()); - } + grid.Children.Add(Content); } } }