Error handling in Smarty
Armand Turpel <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I use smarty in a cms which has its own error log system. So if some thing is
going wrong I have notice of this and can locate the problem shortly. It
would be nice to have a better reporting/control off smarty errors.
Example:
The function in file core/core.rmdir.php remove a directory tree.
But if the following unlink fails I have no notice of this:
(Line 39 > 2.6.1)
$smarty->_unlink($params['dirname'] . DIRECTORY_SEPARATOR . $_entry,
$params['exp_time']);
Suggestion:
var $error = FALSE;
.
.
.
if( FALSE == $smarty->_unlink($...file) )
{
$smarty->error .= 'unlink fails: '.$...file;
}
-----------------
(By the way: The function smarty_core_rmdir still works without
require_once.... on line 35 ?? )
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php