Index: vhLib/Logging.cls.xml
===================================================================
diff -u -r474 -r506
--- vhLib/Logging.cls.xml (.../Logging.cls.xml) (revision 474)
+++ vhLib/Logging.cls.xml (.../Logging.cls.xml) (revision 506)
@@ -215,21 +215,25 @@
-%String
+%GlobalCharacterStream
@@ -287,46 +291,6 @@
]]>
-
-
-Set oLog=##class(vhLib.Logging).AddErrorToLog(Groep,Actie,Error,Detail)
-1
-Groep:%String,Actie:%String,Error:%String,Detail:%String,blnSendMail:%Boolean=1
-Logging
-islist+2^%occRun")&&($$$GETERRORCODE(Error)=$$$GeneralError) lbTo=$LB("ICT_Meldingen@vanhoecke.be") ; Does not provide any extra information
- Set sc=$$SendMiniMailForced^vhLib.Mail(From,lbTo,Subj,Body,,,,,)
- Quit
-aelErrorMailBody()
-#define BodyTitle "Error in "_..%ClassName(1)_" : "
- Set Body=""
- Set Body=Body_$$$BodyTitle_$$$CRLF
- Set Body=Body_"Error message: "_$$ParseStatus^vhLib.System($G(Error,$G(%objlasterror)))_$$$CRLF
- Set Body=Body_""_$$$CRLF
- Set Body=Body_$$$CRLF_"Groep: "_$G(Groep)
- Set Body=Body_$$$CRLF_"Actie: "_$G(Actie)
- Set Body=Body_$$$CRLF_"Detail: "_$G(Detail)
- Set Body=Body_$$$CRLF_"Error: "_$$ParseStatus^vhLib.System(Error)
- Set Body=Body_$$$CRLF
- Set Body=Body_$$$CRLF_"$ZError: "_$ZError
- Set:($L($ZError)) Body=Body_$$$CRLF_"Line : "_##class(VHSys.Scheduler.Logging).GeefTekstOpErrorLocatie($ZError)
- Set:($L($G(%objlasterror))) Body=Body_$$$CRLF_"Object Last Error: "_$$ParseStatus^vhLib.System(%objlasterror)
- Set Body=Body_$$$CRLF_"$ECode: "_$ECode
- Set Body=Body_$$$CRLF_"Stack: "
- For EST=1:1:$ESTACK Set Body=Body_$$$CRLF_" "_$STACK($STACK-EST,"PLACE")
- Set Body=Body_$$$CRLF
- Set Body=Body_$$$CRLF_"--- End of message ---"_$$$CRLF
- Set Body=Body_$$$CRLF_..GetJobInfo(1,"")
- Quit Body
-]]>
-
-
1
blnMultiLine:%String,Indent:%String
Index: vhLib/System.mac.rou
===================================================================
diff -u -r486 -r506
--- vhLib/System.mac.rou (.../System.mac.rou) (revision 486)
+++ vhLib/System.mac.rou (.../System.mac.rou) (revision 506)
@@ -30,9 +30,20 @@
// Handig bij het versturen van bvb. mails met een error-melding
// ==========================================================================================================================================
GetJobInfo(blnMultiLine,Indent)
+ New Exception
Set Indent=$G(Indent),blnMultiLine=$G(blnMultiLine,1)
- Set Txt=Indent_"Device: "_$I_" Job: "_$J
- Set Txt=Txt_$S(blnMultiLine:$$$CRLF_Indent, 1:" ")_"Server: "_##class(TECH.Context.RuntimeContext).Instance().GeefServerNaam()_" NameSpace: "_$$$NSpace_$S(blnMultiLine:$$$CRLF, 1:"")
+ Set Txt="Device: "_$I_" Job: "_$J
+ Set Txt=Txt_$S(blnMultiLine:$$$CRLF_Indent, 1:" ")_"Server: "_##class(TECH.Context.RuntimeContext).Instance().GeefServerNaam()_" NameSpace: "_##class(TECH.Context.RuntimeContext).Instance().GeefNamespace()
+ Try {
+ Set Txt=Txt_$S(blnMultiLine:$$$CRLF_Indent, 1:" ")_"GebruikerID: "_##class(TECH.Context.RuntimeContext).Instance().GeefGebruikerID()
+ Set Txt=Txt_$S(blnMultiLine:$$$CRLF_Indent, 1:" ")_"GebruikerInitialen: "_##class(TECH.Context.RuntimeContext).Instance().GeefGebruikerInitialen()
+ Set Txt=Txt_$S(blnMultiLine:$$$CRLF_Indent, 1:" ")_"ComputerNaam: "_##class(TECH.Context.RuntimeContext).Instance().GeefComputerNaam()
+ }Catch{
+ #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch()
+ Set Txt=Txt_$S(blnMultiLine:$$$CRLF_Indent, 1:" ")_"Kon gebruiker data niet achterhalen : "_Exception.ToString()
+ }
+ Set Txt=Txt_$S(blnMultiLine:$$$CRLF, 1:"")
+
Quit Txt
GetStackToString(Short,NoLastLevels)