X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FActionChain.pm;h=fc39f0974bc3d4b87e19b7cbd4310c1f3315efc2;hb=08680694151d666fc2f69c54065e2aa09e175742;hp=496000bc2d0bc7791ee6ebaaae21f3008a48560a;hpb=76988362a96b1563e101d599eb962b759ecc8cdf;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/ActionChain.pm b/lib/Catalyst/ActionChain.pm index 496000b..fc39f09 100644 --- a/lib/Catalyst/ActionChain.pm +++ b/lib/Catalyst/ActionChain.pm @@ -34,6 +34,14 @@ sub dispatch { } local $c->request->{arguments} = \@args; $action->dispatch( $c ); + + # 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 ); }