|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mrfree Smarty Rookie
Joined: 30 Nov 2004 Posts: 6 Location: Europe.Italy.Sulmona
|
Posted: Tue Nov 30, 2004 12:19 pm Post subject: Smarty and PHP5 using Exception |
|
|
I want to use smarty as template engine for my new software project, but I want to develelop this using PHP5 (object oriented)
Can Smarty throw an exception on error/warning???
I've tryed this:
Code: |
$smarty = new Smarty;
$smarty->display('main.tpl');
|
The file doesn't exist but Smarty report only a warning
Code: | Warning: Smarty error: unable to read resource: "main.tpl" in /usr/lib/php/Smarty/Smarty.class.php on line 1102 |
But I want, in this case, an optimal Uncaught Exception |
|
Back to top |
|
mrfree Smarty Rookie
Joined: 30 Nov 2004 Posts: 6 Location: Europe.Italy.Sulmona
|
Posted: Thu Dec 02, 2004 7:51 am Post subject: |
|
|
|
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Dec 02, 2004 2:55 pm Post subject: |
|
|
Smarty does not use any PHP5 proprietary code (yet), you'll have to implement this yourself. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|