Index: vhUnitTest/TECH/Exceptions.mac.rou =================================================================== diff -u --- vhUnitTest/TECH/Exceptions.mac.rou (revision 0) +++ vhUnitTest/TECH/Exceptions.mac.rou (revision 1931) @@ -0,0 +1,8 @@ + + +RaiseUndefined() + set $ztrap="^%ETN" + Do ##class(vhUnitTest.TECH.Exceptions.KlasseA).RaiseUndefined() + + Quit + \ No newline at end of file Index: TECH/Exceptions/BaseException.cls.xml =================================================================== diff -u -r1074 -r1931 --- TECH/Exceptions/BaseException.cls.xml (.../BaseException.cls.xml) (revision 1074) +++ TECH/Exceptions/BaseException.cls.xml (.../BaseException.cls.xml) (revision 1931) @@ -2,7 +2,7 @@ 1 -%RegisteredObject,TECH.IException +TECH.Exceptions.Exception 0 @@ -23,6 +23,8 @@ 1 %Status %String - Index: vhUnitTest/TECH/Exceptions/KlasseC.cls.xml =================================================================== diff -u --- vhUnitTest/TECH/Exceptions/KlasseC.cls.xml (revision 0) +++ vhUnitTest/TECH/Exceptions/KlasseC.cls.xml (revision 1931) @@ -0,0 +1,20 @@ + + + +1 +%RegisteredObject +0 + + +1 + + + + +1 + + + + Index: TECH/Algo/Stapeling/StapelingException.cls.xml =================================================================== diff -u -r1310 -r1931 --- TECH/Algo/Stapeling/StapelingException.cls.xml (.../StapelingException.cls.xml) (revision 1310) +++ TECH/Algo/Stapeling/StapelingException.cls.xml (.../StapelingException.cls.xml) (revision 1931) @@ -2,7 +2,7 @@ 1 -%RegisteredObject,TECH.Exceptions.BaseException +TECH.Exceptions.BaseException,%RegisteredObject 0 Index: vhUnitTest/TECH/Exceptions/KlasseA.cls.xml =================================================================== diff -u --- vhUnitTest/TECH/Exceptions/KlasseA.cls.xml (revision 0) +++ vhUnitTest/TECH/Exceptions/KlasseA.cls.xml (revision 1931) @@ -0,0 +1,22 @@ + + + +1 +%RegisteredObject +0 + + +1 + + + + +1 + + + + Index: TECH/Exceptions/AbstractOmschrijvingException.cls.xml =================================================================== diff -u -r1574 -r1931 --- TECH/Exceptions/AbstractOmschrijvingException.cls.xml (.../AbstractOmschrijvingException.cls.xml) (revision 1574) +++ TECH/Exceptions/AbstractOmschrijvingException.cls.xml (.../AbstractOmschrijvingException.cls.xml) (revision 1931) @@ -2,7 +2,7 @@ 1 -TECH.IException,%RegisteredObject +TECH.Exceptions.Exception,%RegisteredObject 0 @@ -33,7 +33,10 @@ Wordt door de error handler in het e-mailbericht bijgeschreven. %String - Index: TECH/Exceptions/StatusException.cls.xml =================================================================== diff -u -r1133 -r1931 --- TECH/Exceptions/StatusException.cls.xml (.../StatusException.cls.xml) (revision 1133) +++ TECH/Exceptions/StatusException.cls.xml (.../StatusException.cls.xml) (revision 1931) @@ -23,7 +23,7 @@ %String - Index: vhUnitTest/TECH/Exceptions/TestExceptions.cls.xml =================================================================== diff -u --- vhUnitTest/TECH/Exceptions/TestExceptions.cls.xml (revision 0) +++ vhUnitTest/TECH/Exceptions/TestExceptions.cls.xml (revision 1931) @@ -0,0 +1,34 @@ + + + + +Do ##class(vhUnitTest.Manager).RunTest("/debug/display=all","TECH.Exceptions.TestExceptions") +1 +vhUnitTest.TestCase +0 + + + + + + + + + + Index: vhUnitTest/TECH/Exceptions/KlasseB.cls.xml =================================================================== diff -u --- vhUnitTest/TECH/Exceptions/KlasseB.cls.xml (revision 0) +++ vhUnitTest/TECH/Exceptions/KlasseB.cls.xml (revision 1931) @@ -0,0 +1,47 @@ + + + +1 +%RegisteredObject +0 + + +%String + + + +%String + + + + + + + + + + + Index: TECH/Exceptions/RuntimeException.cls.xml =================================================================== diff -u -r1074 -r1931 --- TECH/Exceptions/RuntimeException.cls.xml (.../RuntimeException.cls.xml) (revision 1074) +++ TECH/Exceptions/RuntimeException.cls.xml (.../RuntimeException.cls.xml) (revision 1931) @@ -2,7 +2,7 @@ 1 -%RegisteredObject,TECH.IException +TECH.Exceptions.Exception 0 @@ -21,6 +21,7 @@ 1 %Status %String - Index: TECH/Error/impl/ErrorHandler.cls.xml =================================================================== diff -u -r1900 -r1931 --- TECH/Error/impl/ErrorHandler.cls.xml (.../ErrorHandler.cls.xml) (revision 1900) +++ TECH/Error/impl/ErrorHandler.cls.xml (.../ErrorHandler.cls.xml) (revision 1931) @@ -52,7 +52,12 @@ Set Error.StackTrace=..StackTrace(3) if ( Error.ErrorCode["TECH.ExceptionHandler") && ($data(%Exception)) && ($isObject(%Exception) ) { - Set Error.StackTrace=..StackTrace(4) + + If %Exception.%Extends("TECH.Exceptions.Exception") { + Set Error.StackTrace = %Exception.GeefStack() + }Else{ + Set Error.StackTrace=..StackTrace(4) + } set Error.ErrorCode = $piece(Error.StackTrace," ",6) Set Error.ErrorCode2="`"_%Exception.GeefExceptionCode()_"`"_%Exception.GeefOmschrijving()_"`" } @@ -137,7 +142,7 @@ do Body.WriteLine("Stack: "_Error.StackTrace) do Body.WriteLine() - if $data(%Exception) && $IsObject(%Exception) { + if $data(%Exception) && $IsObject(%Exception) && '%Exception.%Extends("TECH.Exceptions.Exception") { do Body.WriteLine("ErrorObjectInfo :") do Body.WriteLine(%Exception.ToString()) do Body.WriteLine() @@ -212,7 +217,9 @@ From:%Integer=1 "_$STACK($STACK-i,"MCODE") + For i=From:1:$ESTACK { + Set Txt=Txt_$$$CRLF_i_" "_$STACK($STACK-i)_" : "_$STACK($STACK-i,"PLACE")_" -> "_$STACK($STACK-i,"MCODE") + } Quit Txt ]]> Index: TECH/Exceptions/SaveFailedException.cls.xml =================================================================== diff -u -r1748 -r1931 --- TECH/Exceptions/SaveFailedException.cls.xml (.../SaveFailedException.cls.xml) (revision 1748) +++ TECH/Exceptions/SaveFailedException.cls.xml (.../SaveFailedException.cls.xml) (revision 1931) @@ -29,7 +29,7 @@ %String - Index: TECH/IException.cls.xml =================================================================== diff -u -r1074 -r1931 --- TECH/IException.cls.xml (.../IException.cls.xml) (revision 1074) +++ TECH/IException.cls.xml (.../IException.cls.xml) (revision 1931) @@ -17,6 +17,16 @@ TECH.enu.ExceptionCode + +1 +%String + + + +1 +%TimeStamp + + Wordt door de error handler in het e-mailbericht bijgeschreven. Index: TECH/ExceptionHandler.cls.xml =================================================================== diff -u -r1133 -r1931 --- TECH/ExceptionHandler.cls.xml (.../ExceptionHandler.cls.xml) (revision 1133) +++ TECH/ExceptionHandler.cls.xml (.../ExceptionHandler.cls.xml) (revision 1931) @@ -10,6 +10,7 @@ Exception:TECH.IException @@ -23,6 +24,7 @@ If ('$Data(%Exception)) || ('$IsObject(%Exception)) { + d WLIP^vhDBG(127,"Undefined : "_$ECODE_$ZERROR) Set %Exception = ##class(TECH.Exceptions.RuntimeException).%New($ECODE,$ZERROR) } Index: TECH/Exceptions/Exception.cls.xml =================================================================== diff -u --- TECH/Exceptions/Exception.cls.xml (revision 0) +++ TECH/Exceptions/Exception.cls.xml (revision 1931) @@ -0,0 +1,70 @@ + + + +1 +TECH.IException,%RegisteredObject +0 + + +TECH.IException +1 + + + + +TO DO : Stack zou een %Stream moeten worden. +%String +1 + + + +%TimeStamp +1 + + + +initvalue:%CacheString +1 +1 +%Status + + + + +Exception:TECH.IException + + + + +%String + + + + +%String + + + + +%TimeStamp + + + +