This commit is contained in:
2020-01-08 14:52:43 +01:00
parent bea8632eb5
commit f4c1a74870
136 changed files with 11561 additions and 1072 deletions

View File

@@ -6,14 +6,14 @@ Public Class cErrorHandler
If OP = "" Then OP = VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL ' GLobal gesetzes Errorhandling! (Standart=SHOW)
Select Case OP
Case ERROR_OP.MAIL
sendERRORperMail(title, message, stack, mailadess, zusatz)
sendERRORperMail(title, message, stack, mailadess, zusatz, functionName)
Case ERROR_OP.SHOW
' MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message)
MsgBox(If(functionName <> "", "Fehler in der Funktion '" & functionName & "'" & vbNewLine & vbNewLine, "") & message & vbNewLine & stack & vbNewLine & zusatz, MsgBoxStyle.OkOnly, If(title <> "", title, "Fehler"))
End Select
End Sub
Shared Sub sendERRORperMail(title, errmsg, errstack, recieverMailAdress, zusatz)
Shared Sub sendERRORperMail(title, errmsg, errstack, recieverMailAdress, zusatz, functionName)
Dim Msg As New MailMessage
Dim myCredentials As New System.Net.NetworkCredential
myCredentials.UserName = "support@verag.ag"
@@ -29,7 +29,8 @@ Public Class cErrorHandler
Msg.To.Add(recieverMailAdress)
Msg.Subject = title '"ERROR - DAKOSY Einarbeitung"
Msg.Body = "Uhrzeit: " & Now.ToShortDateString
Msg.Body = "Uhrzeit: " & Now.ToShortDateString & " " & Now.ToShortTimeString
Msg.Body = "Function: " & functionName
Msg.Body &= vbNewLine
Msg.Body &= vbNewLine
Msg.Body &= "Fehlermeldung: " & errmsg