[Catalyst] Chained and exceptions
Bill Moseley
moseley at hank.org
Thu May 9 13:25:09 GMT 2013
I have a feeling I asked this before, but cannot find the post.
[info] Exception powered by Catalyst 5.90030
What's the reasoning that chained actions continue to run after an earlier
exception?
sub start : Chained( '/' ) : CaptureArgs(0) {
warn "in start\n";
}
sub middle : Chained( 'start' ) : CaptureArgs(0) {
warn "in middle\n";
die "died in middle\n"; # or e.g. throw access violation
}
sub lastpart : Chained( 'middle' ) : Args(0) {
my ( $self, $c ) =3D @_;
$c->res->body( "finished\n" );
warn "in lastpart\n";
}
$ script/exception_test.pl /start/middle/lastpart
in start
in middle
*in lastpart*
[error] Caught exception in Exception::Controller::Root->middle "died in
middle"
-- =
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20130509/f5733=
be9/attachment.htm
More information about the Catalyst
mailing list