X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FActionChain.pm;h=fc39f0974bc3d4b87e19b7cbd4310c1f3315efc2;hb=0810283f5e3c710d09ab56ceb8fb0b6bfbe3bbe9;hp=ed2fb51a8cedc1689724b8472eb67d6cc103a8a0;hpb=6e8520be0c895f96e8e28f724ba73ba70ea4fac6;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/ActionChain.pm b/lib/Catalyst/ActionChain.pm index ed2fb51..fc39f09 100644 --- a/lib/Catalyst/ActionChain.pm +++ b/lib/Catalyst/ActionChain.pm @@ -35,8 +35,13 @@ sub dispatch { local $c->request->{arguments} = \@args; $action->dispatch( $c ); - # break the chain if exception occurs in the middle of chain - return if (@{$c->error} && $c->config->{abort_chain_on_error_fix}); + # break the chain if exception occurs in the middle of chain. We + # check the global config flag 'abort_chain_on_error_fix', but this + # is now considered true by default, so unless someone explictly sets + # it to false we default it to true (if its not defined). + my $abort = defined($c->config->{abort_chain_on_error_fix}) ? + $c->config->{abort_chain_on_error_fix} : 1; + return if ($c->has_errors && $abort); } $last->dispatch( $c ); }