Permalink
Browse files

[S32::Exception] X::Parameter::Default now reports the name of the of…

…fensive parameter
  • Loading branch information...
1 parent 0b0335d commit 22ec8abe51ac9ac6ec6bd1fd431ba044d2da4838 @moritz moritz committed Aug 17, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 S32-setting-library/Exception.pod
@@ -18,7 +18,7 @@ Authors of previous versions of this document:
Created: 26 Feb 2009
Last Modified: 17 August 2012
- Version: 17
+ Version: 18
The document is a draft.
@@ -303,9 +303,15 @@ example on mandatory parameters.
my class X::Parameter::Default does X::Comp {
has $.how;
- method message() { "Cannot put default on $.how parameter" };
+ has $.parameter;
+ method message() {
+ $.parameter
+ ?? "Cannot put default on $.how parameter $.parameter"
+ !! "Cannot put default on anonymous $.how parameter";
+ }
}
+
=head3 X::Parameter::Placeholder
Thrown when the user tries to use a placeholder as a formal parameter.

0 comments on commit 22ec8ab

Please sign in to comment.