Created
May 10, 2015 15:04
-
-
Save Tux/fceeab1d62fc77c00382 to your computer and use it in GitHub Desktop.
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
use v6; | |
use Test; | |
class C { | |
class E is Iterable does Positional is Exception { | |
has Int $.error = 0; | |
has Str $.message = "Error"; | |
method sink { | |
"$!error: $!message".say; | |
} | |
} | |
method foo { | |
fail E.new; | |
} | |
} | |
my $e; | |
{ C.new.foo; | |
CATCH { default { $e = $_; }} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment