Re: [Templates] TRY / CATCH under mod_perl

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

From: Perrin Harkins
Subject: Re: [Templates] TRY / CATCH under mod_perl
Date: 16:00 on 05 Aug 2004
Denis Banovic wrote:
> I'm getting a strange behaviour since our serverupgrade Apache 2 /
> mod_perl 2 with latest TT

Are you saying this worked before under mod_perl 1?

> I have an die handler in my script which catches errors.
> 
> $main::SIG{__DIE__}=\&WebApp::Output::die; ### 
> 
> How can I recognise, that this DIE signal a TRY/CATCH is.

There are ways to detect an eval{} context (which is what TT is doing), 
but in general you should not define a DIE handler if you want to be 
able to use exceptions.  Read the mod_perl guide on exception handling 
for more.

- Perrin

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

[Templates] TRY / CATCH under mod_perl
Denis Banovic 10:12 on 05 Aug 2004

Re: [Templates] TRY / CATCH under mod_perl
Perrin Harkins 16:00 on 05 Aug 2004

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