X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FSerialize%2FView.pm;h=62e6b75930db60ad4c3c33499577f7ac41ed094f;hb=3bb36dcaabf34fef5c15b1bb74c5eb198a7f5168;hp=baaec85f86ce2695602d340380288d71ae28eb5a;hpb=58c1c5f55deae2aacef7d0662acb4aa41a6786bd;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/Serialize/View.pm b/lib/Catalyst/Action/Serialize/View.pm index baaec85..62e6b75 100644 --- a/lib/Catalyst/Action/Serialize/View.pm +++ b/lib/Catalyst/Action/Serialize/View.pm @@ -4,6 +4,9 @@ use namespace::autoclean; extends 'Catalyst::Action'; +our $VERSION = '0.82'; +$VERSION = eval $VERSION; + sub execute { my $self = shift; my ( $controller, $c, $view ) = @_; @@ -19,7 +22,15 @@ sub execute { return; } - return $c->view($view)->process($c, $stash_key); + if ($c->view($view)->process($c, $stash_key)) { + return 1; + } else { + # This is stupid. Please improve it. + my $error = join("\n", @{ $c->error }) || "Error in $view"; + $error .= "\n"; + $c->clear_errors; + die $error; + } } 1;