# HG changeset patch # User Chris Cannam # Date 1396273247 -3600 # Node ID 30799a778cac2c4f52c09853996e9e785a8c8b5d # Parent 3fdffd2d06498b61047bc4eca1f6943b6401e5c1 Print (some of) the stack trace when catching exception from test diff -r 3fdffd2d0649 -r 30799a778cac src/may/test.yeti --- a/src/may/test.yeti Mon Mar 31 14:31:56 2014 +0100 +++ b/src/may/test.yeti Mon Mar 31 14:40:47 2014 +0100 @@ -74,6 +74,10 @@ fi catch Exception e: println "Test \(name) threw exception: \(e)"; + trace = e#getStackTrace(); + maxLen = 10; + for (take maxLen trace) do e: println " at \(e)" done; + if length trace > maxLen then println " ..." fi; name; yrt; done (sort (keys testHash)));