aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/try-catch.yue
diff options
context:
space:
mode:
Diffstat (limited to 'spec/inputs/try-catch.yue')
-rw-r--r--spec/inputs/try-catch.yue30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/inputs/try-catch.yue b/spec/inputs/try-catch.yue
new file mode 100644
index 0000000..ad8b1f0
--- /dev/null
+++ b/spec/inputs/try-catch.yue
@@ -0,0 +1,30 @@
1try
2 func 1, 2, 3
3catch err
4 print err
5
6success, result = try
7 func 1, 2, 3
8catch err
9 print err
10
11try func 1, 2, 3
12catch err
13 print err
14
15success, result = try func 1, 2, 3
16
17try
18 print "trying"
19 func 1, 2, 3
20
21try tb.func
22try tb.func!
23try tb.func()
24try (tb.func!)
25
26try tb.func 1
27try tb.func(1)
28
29nil
30