Last active
August 24, 2016 20:43
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub no-catch-control { | |
| die "no-catch-control exception"; | |
| } | |
| sub catch-control { | |
| CONTROL { | |
| say "CONTROL: {$_.gist}"; | |
| die "control exception"; | |
| } | |
| die "catch-control exception"; | |
| } | |
| say "**** no catch control ****"; | |
| for 1 { | |
| no-catch-control; | |
| CATCH { | |
| say "EXCEPTION: {$_.gist}"; | |
| next; | |
| } | |
| } | |
| say "**** WITH catch control, dies upon 'next' in CATCH ****"; | |
| for 1 { | |
| catch-control; | |
| CATCH { | |
| say "EXCEPTION: {$_.gist}"; | |
| next; | |
| } | |
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| **** no catch control **** | |
| EXCEPTION: no-catch-control exception | |
| in sub no-catch-control at catch-control.p6 line 2 | |
| in block <unit> at catch-control.p6 line 19 | |
| **** WITH catch control, dies upon 'next' in CATCH **** | |
| EXCEPTION: catch-control exception | |
| in sub catch-control at catch-control.p6 line 12 | |
| in block <unit> at catch-control.p6 line 31 | |
| CONTROL: Died with CX::Next | |
| control exception | |
| in sub catch-control at catch-control.p6 line 9 | |
| in block <unit> at catch-control.p6 line 31 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment