X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FSerialize%2FView.pm;h=286fc889ca3d8eb723f9b1facb8450c5d87419e7;hp=baaec85f86ce2695602d340380288d71ae28eb5a;hb=067d48ee88e1337e1bfc35b56188fbb438377155;hpb=efab952125dde293960623eae501b1ad57ec9f6f diff --git a/lib/Catalyst/Action/Serialize/View.pm b/lib/Catalyst/Action/Serialize/View.pm index baaec85..286fc88 100644 --- a/lib/Catalyst/Action/Serialize/View.pm +++ b/lib/Catalyst/Action/Serialize/View.pm @@ -19,7 +19,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;