[Templates] only getting one error in a loop
C. Chad Wallace
cwallace at lodgingcompany.com
Thu May 15 01:34:31 BST 2008
At 7:05 PM on 14 May 2008, Robert Hicks wrote:
> Because I am building 2 types of emails...I have 2 $template->process
> commands and because it is in a loop and I have 5 users, I get five
> error message when a template is incorrect.
>
> What I would like to do is catch the errors and only pass the unique
> ones to STDERR.
>
> I am not sure if that is enough to go on.
How about: instead of calling die, you save the error info in a hash,
and then at the end of the loop, "warn" the unique ones.
--
C. Chad Wallace, B.Sc.
The Lodging Company
http://www.skihills.com/
OpenPGP Public Key ID: 0x262208A0
Debian Hint #39: Want to download a package without installing it? Use
'aptitude download <pkgname>'.
More information about the templates
mailing list