error tests and fixes
[gitmo/Moose.git] / lib / Moose / Meta / Method.pm
index a01751a..ee34d32 100644 (file)
@@ -11,8 +11,7 @@ use base 'Class::MOP::Method';
 
 sub _error_thrower {
     my $self = shift;
-    return "Moose::Meta::Class";
-    #( $self->associated_attribute || $self->associated_class ) # FIXME move to Accessor, fix for Constructor
+    ( ref $self && $self->associated_metaclass ) || "Moose::Meta::Class";
 }
 
 sub throw_error {