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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.