Use Logger Module

This commit is contained in:
Jonathan Jenne
2019-04-16 14:01:35 +02:00
parent 4c86bd4c5c
commit 31bf65a5f0
37 changed files with 938 additions and 859 deletions

View File

@@ -73,7 +73,8 @@ Module ModuleMySettings
Try
PWplainText = wrapper.DecryptData(oBuilder.Password)
Catch ex As Exception
ClassLogger.Add("- the Password '" & oBuilder.Password & "' could not be decrypted", False)
LOGGER.Error(ex)
LOGGER.Info("- the Password '" & oBuilder.Password & "' could not be decrypted", False)
PWplainText = oBuilder.Password
End Try
oConnectionString = oRow.Item("Value").ToString.Replace(oBuilder.Password, PWplainText)
@@ -111,6 +112,7 @@ Module ModuleMySettings
Next
Return True
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in LoadMyConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return False
End Try
@@ -121,6 +123,7 @@ Module ModuleMySettings
oDataset.ReadXml(ConfigPath)
Return oDataset.Tables(0)
Catch ex As Exception
LOGGER.Error(ex)
Dim oDataTable = CreateConfigTable()
oDataTable.WriteXml(GetUserConfigPath())
MsgBox("Fehler beim Laden der Konfiguration. Es wurde die Standard Konfiguration geladen. Fehler:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
@@ -192,6 +195,7 @@ Module ModuleMySettings
oTable.AcceptChanges()
Return oTable
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in CreateConfigTable" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return Nothing
End Try
@@ -216,6 +220,7 @@ Module ModuleMySettings
oDatatable.WriteXml(oUserConfigPath)
Return True
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in SaveConfigValue" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return False
End Try