Skip to content

Commit

Permalink
Add X::Enum::NoValue exception
Browse files Browse the repository at this point in the history
For cases when there is no value for a key
  • Loading branch information
vrurg committed Dec 20, 2020
1 parent e3a0c32 commit 28b9581
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core.c/Exception.pm6
Expand Up @@ -2772,6 +2772,14 @@ my class X::Numeric::Confused is Exception {
}
}

my class X::Enum::NoValue is Exception {
has Mu $.enum is required;
has $.value is required;
method message {
"No value '" ~ $!value ~ "' found in enum " ~ $!enum.^name
}
}

my class X::PseudoPackage::InDeclaration does X::Comp {
has $.pseudo-package;
has $.action;
Expand Down

0 comments on commit 28b9581

Please sign in to comment.