Permalink
Browse files

stylistic exception updates

no functional changes
  • Loading branch information...
1 parent 3003279 commit a4c09d1c9271037e59ad83c24582b27118f71296 @moritz moritz committed May 27, 2012
Showing with 5 additions and 6 deletions.
  1. +1 −1 src/core/CallFrame.pm
  2. +1 −1 src/core/Hash.pm
  3. +3 −4 src/core/operators.pm
View
@@ -48,7 +48,7 @@ my class CallFrame {
}
method callframe(Int $level = 0) {
- die X::NYI.new(feature => 'Callframe.callframe');
+ X::NYI.new(feature => 'Callframe.callframe').throw;
}
}
View
@@ -46,7 +46,7 @@ my class Hash {
}
elsif $items { self.STORE_AT_KEY($x, $items.shift) }
else {
- die(X::Hash::Store::OddNumber.new())
+ X::Hash::Store::OddNumber.new.throw
}
}
self
View
@@ -21,19 +21,18 @@ multi infix:<does>(Mu:D \$obj, Mu:U \$rolish, :$value! is parcel) is rw {
$rolish.HOW.archetypes.composalizable() ?? $rolish.HOW.composalize($rolish) !!
die("Cannot mix in a non-composable type");
my @attrs = $role.^attributes().grep: { .has_accessor };
- die(X::Role::Initialization.new())
- unless @attrs == 1;
+ X::Role::Initialization.new().throw unless @attrs == 1;
$obj.HOW.mixin($obj, $role).BUILD_LEAST_DERIVED({ @attrs[0].Str.substr(2) => $value });
}
multi infix:<does>(Mu:U \$obj, Mu:U \$role) is rw {
- die(X::Does::TypeObject.new())
+ X::Does::TypeObject.new().throw
}
multi infix:<does>(Mu:D \$obj, @roles) is rw {
# XXX Mutability check.
$obj.HOW.mixin($obj, |@roles).BUILD_LEAST_DERIVED({});
}
multi infix:<does>(Mu:U \$obj, @roles) is rw {
- die(X::Does::TypeObject.new())
+ X::Does::TypeObject.new().throw
}
proto infix:<but>(|$) { * }

0 comments on commit a4c09d1

Please sign in to comment.