Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
throw typed exception for syntax extensions to illegal categories (RT…
… #82984)
  • Loading branch information
moritz committed Apr 5, 2012
1 parent 34ac9bf commit c62b90d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/Exception.pm
Expand Up @@ -455,6 +455,13 @@ my class X::Syntax::Signature::InvocantMarker does X::Syntax {
}
}

my class X::Syntax::Extension::Category does X::Syntax {
has $.category;
method message() {
"Cannot add tokens of category '$.category'";
}
}

my class X::Attribute::Package does X::Comp {
has $.package-type;
method message() { "A $.package-type cannot have attributes" }
Expand Down

0 comments on commit c62b90d

Please sign in to comment.