set_error_handler and error supression
Posted: Tue Feb 12, 2008 8:58 am
Ok so here's the deal. I have a custom error handler that I use to send myself an email every time there is an error of any sort (E_ALL). Now this was great because it would help me find small bugs in my code that might have seeped through or even let me know that mysql went down for whatever reason...blah blah blah.
Now I switched to the Zend Framework and it uses some error suppressing when trying to load the Controller class. This is because sometimes the controller file won't be there because maybe its a "file not found" page or something. Anyway, I have a plugin that redirects all of these unknown controller requests to a custom file not found page. Great. Awesome. The problem is that there is a @fopen() call which basically returns false because the file does not exist. When the file does not exist, I get an email saying "file does not exist" and im sitting here going "i know!!!!".
So is there a way to get errors that are suppressed like that to not go into my custom error handler? These are the only emails I do not care about and I am getting a million of them.
Now I switched to the Zend Framework and it uses some error suppressing when trying to load the Controller class. This is because sometimes the controller file won't be there because maybe its a "file not found" page or something. Anyway, I have a plugin that redirects all of these unknown controller requests to a custom file not found page. Great. Awesome. The problem is that there is a @fopen() call which basically returns false because the file does not exist. When the file does not exist, I get an email saying "file does not exist" and im sitting here going "i know!!!!".
So is there a way to get errors that are suppressed like that to not go into my custom error handler? These are the only emails I do not care about and I am getting a million of them.