Error handling in Smarty

From: Date: Thu, 04 Mar 2004 00:17:15 +0000
Subject: Error handling in Smarty
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2187@lists.php.net to get a copy of this message
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 ?? )

« previous php.smarty.dev (#2187) next »