X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FAction%2FChained.pm;fp=t%2Flib%2FTestApp%2FController%2FAction%2FChained.pm;h=4c02130cd040caee6567f6b123797fa337e435a6;hp=2af1ec64cbd0b114dd1a58bd7ccbec234c977296;hb=ce22898b619f9043604e7de3d97262364b5b057b;hpb=0bab6d6c644cf9d0988d4b5bf0afec572e3f1719 diff --git a/t/lib/TestApp/Controller/Action/Chained.pm b/t/lib/TestApp/Controller/Action/Chained.pm index 2af1ec6..4c02130 100644 --- a/t/lib/TestApp/Controller/Action/Chained.pm +++ b/t/lib/TestApp/Controller/Action/Chained.pm @@ -143,10 +143,19 @@ sub chain_dt_a :Chained :PathPart('chained/chain_dt') :CaptureArgs(1) { sub chain_dt_b :Chained('chain_dt_a') :PathPart('end') :Args(1) { } # +# Error in the middle of a chain +# +sub chain_error_a :Chained :PathPart('chained/chain_error') :CaptureArgs(1) { + $_[1]->error( 'break in the middle of a chain' ); +} + +sub chain_error_b :Chained('chain_error_a') :PathPart('end') :Args(1) {} + +# # Die in the middle of a chain # sub chain_die_a :Chained :PathPart('chained/chain_die') :CaptureArgs(1) { - $_[1]->error( 'break in the middle of a chain' ); + die( "die in the middle of a chain\n" ); } sub chain_die_b :Chained('chain_die_a') :PathPart('end') :Args(1) {}