X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=435eee6c9bbc5c0a5dbc7beead0bb9b67d1962e5;hb=d9d8aa5102e2b961d4f5f0bdd76d9dbcbcefc1dd;hp=86865b2e9c7875f197552caf6b51c74706dd7d57;hpb=154ef0c8918fbe9315ae5e66ae609548dd550165;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 86865b2..435eee6 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1511,11 +1511,11 @@ sub execute { my $last = pop( @{ $c->stack } ); if ( my $error = $@ ) { - if ( ref($error) and $error eq $DETACH ) { - die $DETACH if($c->depth > 1); + if ( blessed($error) and $error->isa('Catalyst::Exception::Detach') ) { + $error->rethrow if $c->depth > 1; } - elsif ( ref($error) and $error eq $GO ) { - die $GO if($c->depth > 0); + elsif ( blessed($error) and $error->isa('Catalyst::Exception::Go') ) { + $error->rethrow if $c->depth > 0; } else { unless ( ref $error ) {