Index: TECH/Exceptions/Exception.cls.xml =================================================================== diff -u -r1504 -r1566 --- TECH/Exceptions/Exception.cls.xml (.../Exception.cls.xml) (revision 1504) +++ TECH/Exceptions/Exception.cls.xml (.../Exception.cls.xml) (revision 1566) @@ -49,6 +49,7 @@ Set ..ErrorID = "" //$$LOG^%ETN() Set ..Stack = ##class(TECH.Process).GeefStackTrace(1) Set ..Tijdstip = ##class(TECH.Context).Instance().GeefDateTimeAPI().CurrentTimeStamp() + Set %IsToStringRecursive = 0 Quit $$$OK ]]> @@ -107,15 +108,18 @@ #dim ErrorListIterator As TECH.ListIterator = ##class(TECH.ListIterator).%New(..InnerExceptions) While ErrorListIterator.HasNext() { #dim InnerException As TECH.Exceptions.Exception = ErrorListIterator.Next() + Set %IsToStringRecursive = 1 Do TekstStream.WriteLine(Prefix_"InnerExceptie "_ ErrorListIterator.Key() _":") Do TekstStream.Write(InnerException.ToString(Prefix_"***")) - } + } + Do:($$$Not(%IsToStringRecursive)) TekstStream.WriteLine(Prefix_"Stack: "_$$$TAB_..GeefStack()) Do TekstStream.Rewind() #dim Result As %String = TekstStream.Read() if (TekstStream.Size) > 32000 { Set Result = Result _ $$$CRLF _ "Rest van de Exceptie is afgekapt!!!" } + Set %IsToStringRecursive = 0 Quit Result ]]> Index: vhUnitTest/TECH/Exceptions/Exception/ToString/Test.cls.xml =================================================================== diff -u -r1493 -r1566 --- vhUnitTest/TECH/Exceptions/Exception/ToString/Test.cls.xml (.../Test.cls.xml) (revision 1493) +++ vhUnitTest/TECH/Exceptions/Exception/ToString/Test.cls.xml (.../Test.cls.xml) (revision 1566) @@ -86,6 +86,7 @@ #dim Exception = ##class(TECH.ExceptionHandler).Catch() Set List = Exception.ToString() } + Set List = $Piece(List,"Stack:",1) Quit List ]]>