doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/overcatcher.stp
raw| 1 | # make sure that we don't overcatch -- return and next should be able to break |
| 2 | # out of a try/catch block. PR11664 |
| 3 | |
| 4 | probe begin { |
| 5 | f() |
| 6 | try { |
| 7 | println("next") |
| 8 | next |
| 9 | } catch { |
| 10 | println("next-catch") |
| 11 | } |
| 12 | println("next-fallthrough") |
| 13 | } |
| 14 | function f() { |
| 15 | try { |
| 16 | println("return") |
| 17 | return 0 |
| 18 | } catch { |
| 19 | println("return-catch") |
| 20 | } |
| 21 | println("return-fallthrough") |
| 22 | } |
| 23 | probe begin(1) { exit() } |