From 1de0e470699a3283c80d523b03055121c40806ea Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 13 Sep 2021 14:27:50 +0200 Subject: [PATCH] ZooFlow: Improve error messages --- GUIs.ZooFlow/frmFlowForm.vb | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/GUIs.ZooFlow/frmFlowForm.vb b/GUIs.ZooFlow/frmFlowForm.vb index e981e38e..4a3ef323 100644 --- a/GUIs.ZooFlow/frmFlowForm.vb +++ b/GUIs.ZooFlow/frmFlowForm.vb @@ -858,27 +858,42 @@ Public Class frmFlowForm oState.CurrentClipboardContents = ClipboardContents If oState.MonitoringActive = False Then - Logger.Info("Clipboard Watcher is not active!") + Dim oMessage As String = "Clipboard Watcher is not active!" + Logger.Info(oMessage) + MsgBox(oMessage, MsgBoxStyle.Critical, Text) + Exit Sub End If If oState.UserProfiles Is Nothing Then - Logger.Warn("User Profiles is empty!") + Dim oMessage As String = "User Profiles are empty!" + Logger.Info(oMessage) + MsgBox(oMessage, MsgBoxStyle.Critical, Text) + Exit Sub End If If oState.ProfileProcesses Is Nothing OrElse oState.ProfileProcesses.Rows.Count = 0 Then - Logger.Warn("Profile Processes is empty!") + Dim oMessage As String = "Profile Processes are empty!" + Logger.Info(oMessage) + MsgBox(oMessage, MsgBoxStyle.Critical, Text) + Exit Sub End If If oState.ProfileWindows Is Nothing OrElse oState.ProfileWindows.Rows.Count = 0 Then - Logger.Warn("Profile Processes is empty!") + Dim oMessage As String = "Profile Processes are empty!" + Logger.Info(oMessage) + MsgBox(oMessage, MsgBoxStyle.Critical, Text) + Exit Sub End If If oState.ProfileProcesses Is Nothing OrElse oState.ProfileProcesses.Rows.Count = 0 Then - Logger.Warn("Profile Processes is empty!") + Dim oMessage As String = "Profile Processes are empty!" + Logger.Info(oMessage) + MsgBox(oMessage, MsgBoxStyle.Critical, Text) + Exit Sub End If @@ -894,7 +909,7 @@ Public Class frmFlowForm oState.MatchTreeView) Catch ex As Exception Logger.Error(ex) - MsgBox("Fehler beim Laden der Profile. Möglicherweise liegt ein Konfigurationsfehler vor. Mehr Informationen im Log.", MsgBoxStyle.Critical, Text) + MsgBox("Fehler beim Laden der Profile. Möglicherweise liegt ein Konfigurationsfehler vor. Fehlermeldung: " & ex.Message, MsgBoxStyle.Critical, Text) End Try Try