[Catalyst-commits] r10678 - in Catalyst-Runtime/5.80/trunk/lib: .
Catalyst
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Fri Jun 26 15:28:41 GMT 2009
Author: rafl
Date: 2009-06-26 15:28:41 +0000 (Fri, 26 Jun 2009)
New Revision: 10678
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm
Log:
Use methods to throw exceptions, instead of passing globals to die.
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm 2009-06-26 15:28:24 UTC (rev 10677)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm 2009-06-26 15:28:41 UTC (rev 10678)
@@ -225,7 +225,7 @@
sub go {
my $self = shift;
$self->_do_visit('go', @_);
- die $Catalyst::GO;
+ Catalyst::Exception::Go->throw;
}
=head2 $self->forward( $c, $command [, \@arguments ] )
@@ -271,7 +271,7 @@
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 {
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2009-06-26 15:28:24 UTC (rev 10677)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2009-06-26 15:28:41 UTC (rev 10678)
@@ -1512,10 +1512,10 @@
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 ) {
More information about the Catalyst-commits
mailing list