[Templates] what do I do about a "stop error" ?

[prev] [thread] [next] [Date index for 2004/05/11]

From:
Subject: [Templates] what do I do about a "stop error" ?
Date: 16:33 on 11 May 2004
OK I've half worked out what the problem is, but I'm not sure what the =
solution is.

What caused the problem is me adding a signal handler:

$SIG{__DIE__} =3D sub=20
{
	$logger -> debug (Devel::StackTrace -> new);
	$logger -> fatal ("$_[0]\n");
	exit;
};

I did this to ensure the death messages got into the log files.

The code where the DIE originates is:

$htt -> process (\$template, $vars, \$headers) || do { ... error =
recovery etc

Previously the "do" block was executed, no one died, everything was =
fine. Now it seems the signal is caught by the handler, even if I put =
the process () in an eval {} block.

Anyone got any suggestions whereby I can not die at this particular =
failure (which is caused by a STOP directive in the template) but can =
die if other errors happen?

TIA, jamie


Hi,

Sorry this question is so vague, I thought I would try to get a heads-up =
before I delve in with the debugger. The strange thing is this system =
has been running fine (from a TT point of view) for a year, now in the =
last couple of days the perl program has been dying with "stop error - " =
on a few occasions.
Side question: anyone got a link to a searchable TT archive?

I don't think there is anything dodgy in the data, and the exception =
seems to originate quite deep in the TT code, so not really sure how to =
debug as I'm not that familiar with the TT internals.

Here is a stacktrace:

DEBUG  16:14 EmailSender.pl 41 main - Trace begun at EmailSender.pl line =
41
main::__ANON__('stop error - ') called at =
c:/Perl58/site/lib/Template/Context.pm line 481
Template::Context::throw('Template::Context=3DHASH(0x42dddb4)', 'stop', =
'', 'SCALAR(0x4a11ce4)') called at (eval 1558) line 62
eval {...}('Template::Context=3DHASH(0x42dddb4)', 'stop', '', =
'SCALAR(0x4a11ce4)') called at (eval 1558) line 7
Template::Document::__ANON__('Template::Context=3DHASH(0x42dddb4)') =
called at c:/Perl58/site/lib/Template/Document.pm line 141
eval {...}('Template::Context=3DHASH(0x42dddb4)') called at =
c:/Perl58/site/lib/Template/Document.pm line 139
Template::Document::process('Template::Document=3DHASH(0x4378fa0)', =
'Template::Context=3DHASH(0x42dddb4)') called at =
c:/Perl58/site/lib/Template/Context.pm line 336
eval {...}('Template::Document=3DHASH(0x4378fa0)', =
'Template::Context=3DHASH(0x42dddb4)') called at =
c:/Perl58/site/lib/Template/Context.pm line 320
Template::Context::process('Template::Context=3DHASH(0x42dddb4)', =
'Template::Document=3DHASH(0x4378fa0)') called at =
c:/Perl58/site/lib/Template/Service.pm line 97
eval {...}('Template::Context=3DHASH(0x42dddb4)', =
'Template::Document=3DHASH(0x4378fa0)') called at =
c:/Perl58/site/lib/Template/Service.pm line 94
Template::Service::process('Template::Service=3DHASH(0x107e54fc)', =
'SCALAR(0x26df8a8)', 'HASH(0x42b9634)') called at =
c:/Perl58/site/lib/Template.pm line 62
Template::process('Template=3DHASH(0x49810a4)', 'SCALAR(0x26df8a8)', =
'HASH(0x42b9634)', 'SCALAR(0x26d8f34)') called at EmailSender.pl line =
868
main::actionRule('Win32::OLE=3DHASH(0x4361754)', =
'Win32::OLE=3DHASH(0x437f0b0)') called at EmailSender.pl line 1683
main::run('Win32::OLE=3DHASH(0x4361754)', =
'Win32::OLE=3DHASH(0x437f0b0)') called at EmailSender.pl line 1703
FATAL  16:14 EmailSender.pl 42 main - stop error - =20

Thanks for any assistance...
jamie


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

(message missing)

[Templates] what do I do about a "stop error" ?
16:33 on 11 May 2004

Re: [Templates] what do I do about a "stop error" ?
Perrin Harkins 16:41 on 11 May 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52