MS Release
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
Imports Microsoft.VisualBasic.ApplicationServices
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
Imports DigitalData.Modules.ZooFlow
|
||||
Imports Microsoft.VisualBasic.ApplicationServices
|
||||
|
||||
Namespace My
|
||||
' Für MyApplication sind folgende Ereignisse verfügbar:
|
||||
@@ -8,6 +11,8 @@ Namespace My
|
||||
' StartupNextInstance: Wird beim Starten einer Einzelinstanzanwendung ausgelöst, wenn die Anwendung bereits aktiv ist.
|
||||
' NetworkAvailabilityChanged: Wird beim Herstellen oder Trennen der Netzwerkverbindung ausgelöst.
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
|
||||
Private Sub MyApplication_UnhandledException(sender As Object, e As UnhandledExceptionEventArgs) Handles Me.UnhandledException
|
||||
Dim oMessage = "Application encountered an unhandled error!" & vbNewLine & vbNewLine &
|
||||
"The errormessage was:" & vbNewLine & e.Exception.Message & vbNewLine &
|
||||
@@ -19,7 +24,7 @@ Namespace My
|
||||
If DEBUG = True Then
|
||||
Dim oLogMessage = LOGCONFIG.Logs.Last()
|
||||
Dim oLogSplit As String() = oLogMessage.Split("|")
|
||||
Dim oDBMessage = PrepareLogMessage(oLogMessage) & $" [Machinename: {Environment.MachineName}]"
|
||||
Dim oDBMessage = PrepareLogMessage(oLogMessage) & $" [Machinename: {System.Environment.MachineName}]"
|
||||
|
||||
Dim oSQL = $"INSERT INTO [dbo].[TBPM_LOG_DEBUG] ([USERID], [LOGMSG], [ADDED_WHEN], DATE_STR) VALUES({USER_ID},'{oDBMessage}',GETDATE(),'{Now}')"
|
||||
DatabaseFallback.ExecuteNonQueryECM(oSQL)
|
||||
@@ -27,8 +32,9 @@ Namespace My
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
|
||||
MsgBox(oMessage, MsgBoxStyle.Critical, "Flow Task")
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
Reference in New Issue
Block a user