Improve Base Form Properties, Improve PanelManager

This commit is contained in:
Jonathan Jenne
2019-03-11 14:49:48 +01:00
parent e7e6d73411
commit 896426da3b
15 changed files with 145 additions and 61 deletions

View File

@@ -10,6 +10,10 @@ Public Class ClassErrorHandler
Public Sub New(Logger As Logger)
_Logger = Logger
End Sub
Public Sub ShowErrorMessage(Exception As Exception)
_Logger.Error(Exception)
MsgBox(GetMessage(Exception), MsgBoxStyle.Critical, "Unexpected Error")
End Sub
Private Function GetMessage(Exception As Exception)
Dim oTargetSite = Exception.TargetSite
@@ -34,11 +38,6 @@ Public Class ClassErrorHandler
Return oMessage
End Function
Public Sub ShowErrorMessage(Exception As Exception)
_Logger.Error(Exception)
MsgBox(GetMessage(Exception), MsgBoxStyle.Critical, "Unexpected Error")
End Sub
Private Function GetMethodName(Exception As Exception) As String
Dim oMethodName = Exception.TargetSite?.ReflectedType?.Name