Debian Codegraph @

testsuite/semok/pr30570.stp

raw
1 #! stap -p2
2
3 # PR30570: ei should be resolvable in all of the following
4
5 # the try block is elided
6 probe oneshot {
7 try { }
8 catch (e1)
9 { print(e1) }
10 }
11
12 # error var is elided
13 probe oneshot {
14 try { print("foo") }
15 catch (e2)
16 { }
17 }
18
19 # error var and the try block are elided
20 probe oneshot {
21 try { }
22 catch (e3)
23 { }
24 }
25
26 # error var and the try block are elided which means
27 # it's not an issue to use e4 as a long here ...
28 # except after PR32964, type checking is done more
29 # systematically on even elided variables, so this
30 # would be an error!
31 # global e4 = 10
32 # probe oneshot {
33 # try { }
34 # catch (e4)
35 # { }
36 # }
37
38 # e5 can be a global string
39 global e5 = "foo"
40 probe oneshot {
41 try { }
42 catch (e5)
43 { print(e5) }
44 }