Index: TECH/Error/impl/ErrorHandler.cls.xml =================================================================== diff -u -r946 -r995 --- TECH/Error/impl/ErrorHandler.cls.xml (.../ErrorHandler.cls.xml) (revision 946) +++ TECH/Error/impl/ErrorHandler.cls.xml (.../ErrorHandler.cls.xml) (revision 995) @@ -1,5 +1,5 @@ - + Deze class doet de eigenlijke error afhandeling. @@ -8,7 +8,7 @@ TECH.Error 1 %RegisteredObject -62172,56692.637432 +62178,56193.223779 62025,48050.831801 0 @@ -43,12 +43,23 @@ Set Error=##class(TECH.Error.dto.ErrorInfo).%New() Set Error.Label=$G(Label) Set Error.ErrorCode=$ZERROR - Set:Error.ErrorCode["" Error.ErrorCode2=$ECODE - ;Set $ECODE = "" // $ECODE op leeg zetten anders gaat hij verder den boom in :) Set Error.TrapHandler=$ETrap Set:$G(%objlasterror)'="" Error.ObjectLastError=$$ParseStatus^vhLib(%objlasterror) + Set Error.StackTrace=..StackTrace(3) + + if ( Error.ErrorCode["TECH.ExceptionHandler") && ($data(%Exception)) && ($isObject(%Exception) ) { + Set Error.StackTrace=..StackTrace(5) + set Error.ErrorCode = $piece(Error.StackTrace," ",6) + Set Error.ErrorCode2="`"_%Exception.GeefExceptionCode()_"`"_%Exception.GeefOmschrijving()_"`" + } + else { + if Error.ErrorCode["" { set Error.ErrorCode2=$ECODE } + Set Error.StackTrace=..StackTrace(3) + Set Error.ErrorCode=$ZERROR + } + Set Error.Device=$I Set Error.Job=$J Set Error.Server=$ZU(110) @@ -95,17 +106,10 @@ @@ -128,11 +132,20 @@ do Body.WriteLine("TrapHandler: "_Error.TrapHandler) do Body.WriteLine("Stack: "_Error.StackTrace) do Body.WriteLine() + + if $data(%Exception) && $IsObject(%Exception) { + do Body.WriteLine("ErrorObjectInfo :") + do Body.WriteLine(%Exception.ToString()) + do Body.WriteLine() + } + do Body.WriteLine("RemoteIP: "_Error.RemoteIP) do Body.WriteLine() do Body.WriteLine("Device: "_Error.Device_" Job: "_Error.Job) do Body.WriteLine("Server: "_Error.Server_" NameSpace: "_Error.NameSpace) do Body.WriteLine() + + do Body.WriteLine("Variabelen : ") /** / @@ -201,5 +214,5 @@ ]]> - +