__PACKAGE__->meta->add_attribute('constructor_class' => (
accessor => 'constructor_class',
- default => sub { 'Moose::Meta::Method::Constructor' }
+ default => 'Moose::Meta::Method::Constructor',
));
__PACKAGE__->meta->add_attribute('destructor_class' => (
accessor => 'destructor_class',
- default => sub { 'Moose::Meta::Method::Destructor' }
+ default => 'Moose::Meta::Method::Destructor',
));
__PACKAGE__->meta->add_attribute('error_class' => (
);
}
-#{ package Moose::Meta::Class::ErrorRoutines; %Carp::Internal?
-
our $error_level;
sub throw_error {
unshift @args, "message";
}
- my %args = ( metaclass => $self, error => $@, @args );
+ my %args = ( metaclass => $self, last_error => $@, @args );
$args{depth} += $error_level;
my $class = ref $self ? $self->error_class : "Moose::Error::Default";
+ Class::MOP::load_class($class);
+
$class->new(
Carp::caller_info($args{depth}),
%args