2 USING: compiler tools.test namespaces sequences
3 kernel.private kernel math continuations continuations.private
4 words splitting grouping sorting accessors ;
6 : symbolic-stack-trace ( -- newseq )
7 error-continuation get call>> callstack>array
10 : foo ( -- * ) 3 throw 7 ;
11 : bar ( -- * ) foo 4 ;
12 : baz ( -- * ) bar 5 ;
13 [ baz ] [ 3 = ] must-fail-with
17 { baz bar foo throw } tail?
20 : bleh ( seq -- seq' ) [ 3 + ] map [ 0 > ] filter ;
22 : stack-trace-any? ( word -- ? ) symbolic-stack-trace memq? ;
25 [ { 1 "hi" } bleh ] ignore-errors \ + stack-trace-any?
29 [ { "hi" } bleh ] ignore-errors