Permalink
Browse files

X::Comp::Trait exception becomes X::Comp::Trait::Unknown

  • Loading branch information...
1 parent 956aa09 commit 2d28fdd1c114635114ba6baf263e98d3d94c519c @lizmat lizmat committed Aug 27, 2013
Showing with 10 additions and 10 deletions.
  1. +2 −2 src/core/Exception.pm
  2. +4 −4 src/core/Variable.pm
  3. +4 −4 src/core/traits.pm
View
@@ -452,15 +452,15 @@ my class X::NYI is Exception {
}
my class X::Comp::NYI is X::NYI does X::Comp { };
-my class X::Trait is Exception {
+my class X::Trait::Unknown is Exception {
has $.type; # is, will, of etc.
has $.subtype; # wrong subtype being tried
has $.declaring; # variable, sub, parameter, etc.
method message () {
"Can't use unknown trait '$.type $.subtype' in a$.declaring declaration."
}
}
-my class X::Comp::Trait is X::Trait does X::Comp { };
+my class X::Comp::Trait::Unknown is X::Trait::Unknown does X::Comp { };
my class X::OutOfRange is Exception {
has $.what = 'Argument';
View
@@ -1,6 +1,6 @@
# for our tantrums
my class X::Comp::NYI { ... };
-my class X::Comp::Trait { ... };
+my class X::Comp::Trait::Unknown { ... };
# Variable traits come here, not in traits.pm, since we declare Variable
# in the setting rather than BOOTSTRAP.
@@ -20,7 +20,7 @@ my class Variable {
# "is" traits
multi trait_mod:<is>(Variable:D $v, |c ) {
- $v.throw( 'X::Comp::Trait',
+ $v.throw( 'X::Comp::Trait::Unknown',
type => 'is',
subtype => c.hash.keys[0],
declaring => ' variable',
@@ -56,7 +56,7 @@ multi trait_mod:<is>(Variable:D $v, :$dynamic!) {
# "of" traits
multi trait_mod:<of>(Variable:D $v, |c ) {
- $v.throw( 'X::Comp::Trait',
+ $v.throw( 'X::Comp::Trait::Unknown',
type => 'of',
subtype => c.hash.keys[0],
declaring => ' variable',
@@ -78,7 +78,7 @@ multi trait_mod:<of>(Variable:D $v, Mu:U $of ) {
# phaser traits
multi trait_mod:<will>(Variable:D $v, $block, |c ) {
- $v.throw( 'X::Comp::Trait',
+ $v.throw( 'X::Comp::Trait::Unknown',
type => 'will',
subtype => c.hash.keys[0],
declaring => ' variable',
View
@@ -6,7 +6,7 @@ my class X::Composition::NotComposable { ... }
my class X::Import::MissingSymbols { ... }
my class X::Redeclaration { ... }
my class X::Inheritance::SelfInherit { ... }
-my class X::Comp::Trait { ... };
+my class X::Comp::Trait::Unknown { ... };
proto trait_mod:<is>(|) { * }
multi trait_mod:<is>(Mu:U $child, Mu:U $parent) {
@@ -53,7 +53,7 @@ multi trait_mod:<is>(Mu:U $type, *%fail) {
}
multi trait_mod:<is>(Attribute:D $attr, |c ) {
- X::Comp::Trait.new(
+ X::Comp::Trait::Unknown.new(
file => $?FILE,
line => $?LINE,
type => 'is',
@@ -73,7 +73,7 @@ multi trait_mod:<is>(Attribute:D $attr, :$box_target!) {
}
multi trait_mod:<is>(Routine:D $r, |c ) {
- X::Comp::Trait.new(
+ X::Comp::Trait::Unknown.new(
file => $?FILE,
line => $?LINE,
type => 'is',
@@ -147,7 +147,7 @@ multi trait_mod:<is>(Routine $r, :$assoc!) {
BEGIN &trait_mod:<is>.set_onlystar();
multi trait_mod:<is>(Parameter:D $param, |c ) {
- X::Comp::Trait.new(
+ X::Comp::Trait::Unknown.new(
file => $?FILE,
line => $?LINE,
type => 'is',

0 comments on commit 2d28fdd

Please sign in to comment.