X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=d75651498db854890d30860fc1e04e150e3ada6b;hp=34fd2d062d45c0d66c83c2f1c87aeee8c81cabd4;hb=9ce444302fb0d264c4182d57d564e376e61a4725;hpb=4065bc1e439e2fe84ab78901cc9dcbff3906686c diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 34fd2d0..d756514 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -22,6 +22,7 @@ use Scalar::Util qw/weaken blessed/; use Tree::Simple qw/use_weak_refs/; use Tree::Simple::Visitor::FindByUID; use attributes; +use Carp qw/croak/; __PACKAGE__->mk_accessors( qw/counter request response state action stack namespace/ @@ -298,6 +299,7 @@ sub error { my $c = shift; if ( $_[0] ) { my $error = ref $_[0] eq 'ARRAY' ? $_[0] : [@_]; + croak @$error unless ref $c; push @{ $c->{error} }, @$error; } elsif ( defined $_[0] ) { $c->{error} = undef }