Add ErrorHandler Class

This commit is contained in:
Jonathan Jenne
2019-02-22 12:27:07 +01:00
parent 19bc39c0ce
commit e102f818e2
5 changed files with 69 additions and 22 deletions

View File

@@ -1,8 +1,15 @@
Public Class frmConfigService
Imports DigitalData.GUIs.ClientSuite.ClassUIUtils
Imports DigitalData.Modules.Logging
Public Class frmConfigService
Private _Logger As Logger
Private _Service As ClassService
Private _ErrorHandler As ClassErrorHandler
Private Sub frmServiceConfig_Load(sender As Object, e As EventArgs) Handles Me.Load
_Logger = My.LogConfig.GetLogger()
_Service = New ClassService(My.LogConfig)
_ErrorHandler = New ClassErrorHandler(_Logger)
If My.SystemConfigManager.Config.ServiceConnection <> String.Empty Then
txtIPAddress.Text = My.SystemConfigManager.Config.ServiceIP
@@ -39,9 +46,8 @@
End Select
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
_ErrorHandler.ShowErrorMessage(ex)
End Try
End Sub
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click