summaryrefslogtreecommitdiffstats
path: root/tests/007/except-1.txr
blob: 7b7b9ec3c5a79af248403e9b942759f974d51a10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@(defex u0)
@(defex u1)
@(define baz (x))
@  (cases)
@    (bind x "0")
@    (throw u0 "text0")
@  (or)
@    (bind x "1")
@    (throw u1 "text1")
@  (end)
@(end)
@(define bar (x))
@  (baz x)
@(end)
@(define foo ())
@  (next :tlist ("0" "1"))
@  (collect)
@num
@    (try)
@      (bar num)
@    (catch u0 (arg))
@      (output)
caught u0: @arg
@      (end)
@    (catch u1 (arg))
@      (output)
caught u1: @arg
@      (end)
@    (end)
@  (end)
@(end)
@(foo)