Skip to content

Instantly share code, notes, and snippets.

@awwaiid
Created August 24, 2016 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save awwaiid/7acc14380c3a0a45e8fda5b42933b55a to your computer and use it in GitHub Desktop.
Save awwaiid/7acc14380c3a0a45e8fda5b42933b55a to your computer and use it in GitHub Desktop.
sub catch-control {
CONTROL {
die "Caught a CONTROL ({.gist})";
}
die "forced exception";
}
for 1 {
catch-control;
CATCH {
say "EXCEPTION: {$_.gist}";
last;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment