X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp%2FContext.pm;fp=t%2Flib%2FTestApp%2FContext.pm;h=f6219964185817ef7cdd2511138187885ae73a2f;hb=c034d9bff89fd9191dd3679eab3d4656397eef3a;hp=38e4bb889af8118bca5997b363bae49e2b9fcbab;hpb=2ecb3b2ba79cd50746abcdf1620041c5e0851c0f;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp/Context.pm b/t/lib/TestApp/Context.pm index 38e4bb8..f621996 100644 --- a/t/lib/TestApp/Context.pm +++ b/t/lib/TestApp/Context.pm @@ -54,5 +54,16 @@ sub execute { return $c->SUPER::execute(@_); } +# Replace the very large HTML error page with +# useful info if something crashes during a test +sub finalize_error { + my $c = shift; + + $c->next::method(@_); + + $c->res->status(500); + $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) ); +} + 1;