Skip to content

Commit

Permalink
Added an X::Cannot::Map exception
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Mar 12, 2019
1 parent 6e8df01 commit fd8a00a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/Exception.pm6
Expand Up @@ -2149,6 +2149,15 @@ my class X::Sequence::Deduction is Exception {
}
}

my class X::Cannot::Map is Exception {
has $.what = "(<unknown type>)";
has $.using = "(<an unknown expression>)";
has $.suggestion;
method message() {
my $message = "Cannot map a $.what using $.using";
$.suggestion ?? "$message\n$.suggestion" !! $message
}
}
my class X::Cannot::Lazy is Exception {
has $.action;
has $.what;
Expand Down

0 comments on commit fd8a00a

Please sign in to comment.