Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

WARNING Error when cache does not exist

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
sbouber
Smarty Rookie


Joined: 27 Jan 2004
Posts: 6

PostPosted: Mon Feb 02, 2004 12:09 pm    Post subject: WARNING Error when cache does not exist Reply with quote

hi everybody

i found that smarty (that i like a lot...) throws a warning error the first time a cache file is searched, and of course as it is not created yet, not found. With the default error handler, the error is discarded silently
with a custom error handler the error appears.
maybe it should not be like that, maybe i am wrong, that is a possibility...
but if i am right, that should not be an error not to find a cache file before it is created

******************************
ERRORTYPE => Warning
ERROR => 2
ERRORSTR => fopen(C:/Program files/Apache Group/Apache/htdocs/cachetries/cache\mlkj456\%%117\%%1172603085\index.tpl): failed to open stream: No such file or directory
ERRORFILE => C:\php\includes\smarty\Smarty.class.php
ERRORLINE => 1741
******************************
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Feb 02, 2004 12:39 pm    Post subject: Reply with quote

you can catch errors that where silenced by the @-operator in your error_handler.

check it with something like:
Code:
if (error_reporting()==0) {
   /* the error was inside an @-statement */
} else {
   /* "regular" error */
}


inside the error-handler.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sbouber
Smarty Rookie


Joined: 27 Jan 2004
Posts: 6

PostPosted: Mon Feb 02, 2004 12:56 pm    Post subject: Reply with quote

hi messju
it works, especially when doing nothing inside the @-part
that is cool programming
thanks
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP