add template name to exceptions
[catagits/Catalyst-View-TT.git] / lib / Catalyst / View / TT.pm
index 861d047..58b2476 100644 (file)
@@ -214,7 +214,7 @@ sub process {
     local $@;
     my $output = eval { $self->render($c, $template) };
     if (my $err = $@) {
-        return $self->_rendering_error($c, $err);
+        return $self->_rendering_error($c, $template . ': ' . $err);
     }
     if (blessed($output) && $output->isa('Template::Exception')) {
         $self->_rendering_error($c, $output);
@@ -257,7 +257,7 @@ sub render {
             die $self->template->error if $self->{render_die};
             return $self->template->error;
         }
-        $c->log->debug('The Catalyst::View::TT render() method of will die on error in a future release. Unless you are calling the render() method manually, you probably want the new behaviour, so set render_die => 1 in config for ' . blessed($self) . '. If you are calling the render() method manually and you wish it to continue to return the exception rather than throwing it, add render_die => 0 to your config.') if $c->debug;
+        $c->log->debug('The Catalyst::View::TT render() method will start dying on error in a future release. Unless you are calling the render() method manually, you probably want the new behaviour, so set render_die => 1 in config for ' . blessed($self) . '. If you wish to continue to return the exception rather than throwing it, add render_die => 0 to your config.') if $c->debug;
         return $self->template->error;
     }
     return $output;
@@ -544,12 +544,12 @@ N.B. This is usually done automatically by L<Catalyst::Action::RenderView>.
 Renders the given template and returns output. Throws a L<Template::Exception>
 object upon error.
 
-The template variables are set to C<%$args> if $args is a hashref, or
-$C<< $c->stash >> otherwise. In either case the variables are augmented with
-C<base> set to C< << $c->req->base >>, C<c> to C<$c> and C<name> to
+The template variables are set to C<%$args> if C<$args> is a hashref, or
+C<< $c->stash >> otherwise. In either case the variables are augmented with
+C<base> set to C<< $c->req->base >>, C<c> to C<$c>, and C<name> to
 C<< $c->config->{name} >>. Alternately, the C<CATALYST_VAR> configuration item
 can be defined to specify the name of a template variable through which the
-context reference (C<$c>) can be accessed. In this case, the C<c>, C<base> and
+context reference (C<$c>) can be accessed. In this case, the C<c>, C<base>, and
 C<name> variables are omitted.
 
 C<$template> can be anything that Template::process understands how to