Commit | Line | Data |
---|---|---|
c034d9bf | 1 | package TestAppOneView::Context; |
2 | use Moose; | |
3 | extends 'Catalyst::Context'; | |
4 | ||
5 | # Replace the very large HTML error page with | |
6 | # useful info if something crashes during a test | |
7 | sub finalize_error { | |
8 | my $c = shift; | |
9 | ||
10 | $c->next::method(@_); | |
11 | ||
12 | $c->res->status(500); | |
13 | $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) ); | |
14 | } | |
15 | ||
16 | 1; | |
17 |