if ( my $error = $@ ) {
if ( blessed($error) and $error->isa('Catalyst::Exception::Detach') ) {
- die $DETACH if($c->depth > 1);
+ $error->rethrow if $c->depth > 1;
}
elsif ( blessed($error) and $error->isa('Catalyst::Exception::Go') ) {
- die $GO if($c->depth > 0);
+ $error->rethrow if $c->depth > 0;
}
else {
unless ( ref $error ) {
sub go {
my $self = shift;
$self->_do_visit('go', @_);
- die $Catalyst::GO;
+ Catalyst::Exception::Go->throw;
}
=head2 $self->forward( $c, $command [, \@arguments ] )
sub detach {
my ( $self, $c, $command, @args ) = @_;
$self->_do_forward(detach => $c, $command, @args ) if $command;
- die $Catalyst::DETACH;
+ Catalyst::Exception::Detach->throw;
}
sub _action_rel2abs {