Try to dump 'basic' stacktrace if there's an error printing 'full' stacktrace jv
authorJan Vrany <jan.vrany@labware.com>
Mon, 15 Jun 2020 11:32:39 +0100
branchjv
changeset 567 8d386d0a4bfb
parent 566 030aa8306eda
child 568 172c02e57616
Try to dump 'basic' stacktrace if there's an error printing 'full' stacktrace
reports/Builder__TestReportFormat.st
--- a/reports/Builder__TestReportFormat.st	Tue Jun 02 11:56:19 2020 +0100
+++ b/reports/Builder__TestReportFormat.st	Mon Jun 15 11:32:39 2020 +0100
@@ -191,17 +191,31 @@
     s cr.
     ] on: Error do:[:ex|
         s   cr;
-            nextPutAll:'!!!!!!ERROR WHEN GETTING STACK TRACE!!!!!!'; cr;
-            nextPutAll: ex description; cr
+            nextPutAll:'!!!!!!ERROR WHEN GETTING FULL STACK TRACE!!!!!!'; cr;
+            nextPutAll: ex description; cr.
+        [
+            ex suspendedContext fullPrintAllOn: s
+        ] on: Error do:[:ex |
+            s   cr; nextPutAll:'!!!!!!ERROR WHEN GETTING BASIC STACK TRACE!!!!!!'; cr.
+        ]
     ]. 
 
     "
     String streamContents:[ :s | Builder::TestReportFormat new writeContext: thisContext on: s ]
+
+    String streamContents:[ :s |
+        [
+            TestFailure sunitSignalWith: 'XXX'
+        ] on: TestFailure do:[:ex |  
+            Builder::TestReportFormat new writeContext: ex suspendedContext on: s
+        ]
+    ].
+
     "
 
     "Created: / 03-08-2011 / 14:53:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 15-03-2016 / 14:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 02-06-2020 / 11:55:00 / Jan Vrany <jan.vrany@labware.com>"
+    "Modified: / 15-06-2020 / 11:26:31 / Jan Vrany <jan.vrany@labware.com>"
 !
 
 writeContextArgs: context on: s