From 8ce6a921464f64feae5725149d8f1dd527586afc Mon Sep 17 00:00:00 2001 From: fyr77 Date: Sat, 24 Feb 2024 13:44:34 +0100 Subject: [PATCH] add notification exception handling --- EnvyUpdate/Notify.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/EnvyUpdate/Notify.cs b/EnvyUpdate/Notify.cs index ac317c1..d889163 100644 --- a/EnvyUpdate/Notify.cs +++ b/EnvyUpdate/Notify.cs @@ -6,9 +6,16 @@ namespace EnvyUpdate { public static void ShowDrivUpdatePopup() { - var toast = new ToastContentBuilder(); - toast.AddText(Properties.Resources.update_popup_message); - toast.Show(); + try + { + var toast = new ToastContentBuilder(); + toast.AddText(Properties.Resources.update_popup_message); + toast.Show(); + } + catch (System.Exception ex) + { + Debug.LogToFile("WARN Could not show notification. Error: " + ex.Message); + } } } } \ No newline at end of file