Skip Menu |
 

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 17630
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: dwheeler [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Ovid <publiustemp-pdxpm [...] yahoo.com>
Subject: Bug in Template::Service Exception Handling
Date: Mon, 13 Feb 2006 18:54:27 -0800
To: bug-template-toolkit [...] rt.cpan.org
From: David Wheeler <dwheeler [...] cpan.org>
Download (untitled) / with headers
text/plain 878b
If a template is handling an object that throws its own exception objects (not strings, but real objects, such as defined by Exception::Class), Template::Service tries to call a Template::Exception method that likely does not exist in the exception object. This patch seems to fix the bug for me, so that my exception properly percolates up and appears in my error log. --- lib/Template/Service.pm.old 2006-02-13 18:50:29.000000000 -0800 +++ lib/Template/Service.pm 2006-02-13 18:50:53.000000000 -0800 @@ -204,7 +204,7 @@ # point... unless a module like CGI::Carp messes around with the # DIE handler. return undef - unless (ref $$error); + unless eval { $$error->isa('Template::Exception') }; # a 'stop' exception is thrown by [% STOP %] - we return the output # buffer stored in the exception object Thanks! David


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.