Revision history for Perl extension Catalyst::View::TT.
- - The "render()" method now dies on exception, rather than returning
- the exception object.
+ - The "render()" method now throws a warning on exception before
+ returning the exception. To silence the warning, pass 'render_die =>
+ 0' to the constructor. Better yet, pass 'render_die => 1' to make it
+ die instead of returning the excption. This will be the default in a
+ future release.
0.32 2010-02-16 05:55:00
- Various documentation improvements.
[ @{ $vars->{additional_template_paths} }, @{ $self->{include_path} } ]
if ref $vars->{additional_template_paths};
- $self->template->process( $template, $vars, \$output )
- or die $self->template->error;
+ unless ( $self->template->process( $template, $vars, \$output ) ) {
+ if (exists $self->{render_die}) {
+ die $self->template->error if $self->{render_die};
+ return $self->template->error;
+ }
+ require Carp;
+ Carp::carp('The Catalyst::View::TT render() method of will die on error in a future release. If you want it to continue to return the exception instead, pass render_die => 0 to the constructor');
+ return $self->template->error;
+ }
return $output;
}