performance fixes for drawing group header, log (to database on) unhandled exceptions

This commit is contained in:
Jonathan Jenne
2020-10-21 12:21:51 +02:00
parent 856aa7c298
commit b0b144098b
3 changed files with 110 additions and 93 deletions

View File

@@ -13,10 +13,20 @@ Namespace My
"The errormessage was:" & vbNewLine & e.Exception.Message & vbNewLine &
"The stacktrace was:" & vbNewLine & e.Exception.StackTrace
If IsNothing(LOGGER) = False Then
LOGGER.Info(oMessage)
LOGGER.Error(e.Exception)
End If
LOGGER.Error(e.Exception)
Try
If USER_DEBUG_LOG = True Then
Dim oLogMessage = LOGCONFIG.Logs.Last()
Dim oLogSplit As String() = oLogMessage.Split("|")
Dim oDBMessage = PrepareLogMessage(oLogMessage)
Dim oSQL = $"INSERT INTO [dbo].[TBPM_LOG_DEBUG] ([USERID], [LOGMSG], [ADDED_WHEN], DATE_STR) VALUES({USER_ID},'{oDBMessage}',GETDATE(),'{Now}')"
ClassDatabase.Execute_non_Query(oSQL)
End If
Catch ex As Exception
LOGGER.Error(ex)
End Try
MsgBox(oMessage, MsgBoxStyle.Critical, "Process Manager")
End Sub