This commit is contained in:
Jonathan Jenne
2021-11-12 16:43:16 +01:00
parent 6bed0b3024
commit cc49d821f3
11 changed files with 217 additions and 189 deletions

View File

@@ -1,4 +1,5 @@
Imports DigitalData.Modules.Logging
Imports MultiTool.Shared.Exceptions
Public Class FormHelper
Private ReadOnly Logger As Logger
@@ -13,6 +14,15 @@ Public Class FormHelper
oMessage &= $"{vbNewLine}{pDetails}"
End If
If TypeOf pException Is MultiToolException Then
oMessage &= $"{vbNewLine}"
Select Case pException.GetType()
Case GetType(MissingAttributeException)
oMessage &= $"Fehlendes Attribut: '{pException.Message}'"
End Select
End If
Logger.Error(pException)
MsgBox(oMessage, MsgBoxStyle.Critical, Application.ProductName)
End Sub