Re: Error Suppression with '@'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Does suppressing the error only suppress it from the screen, or does it ignore the error?

ie: is the error still logged?

On Aug 2, 2005, at 12:18 PM, John Nichel wrote:


Justin Burger wrote:


Good Morning,
I was having a discussion with a fellow PHP Developer this morning and he mentioned that he put's an '@' sign in front of all function calls, and
every time he accesses an array;
I know that this is sloppy, and dangerous, but I don't know exactly what this exposes him to, can any one give me any real world examples of why
this is bad, so I can relate it to his code?
php.net does not have much information about this. It seems like
suppressing errors, rather then catching them is problematic.



I'm going to partially disagree with some of the responses you get on this by saying that it doesn't have to be sloppy or a bad idea. I use the '@' symbol on _some_ of my function calls (mainly MySQL stuff), but only because I have my own error handling system in place. Some will say that if you want to control what is being printed to the screen, modify the php.ini file, but I don't fully subscribe to that. In production, I do turn off notices, but that's about it. For me, it boils down to my wanting to control the verbatim of the error; ie make the error messages a bit more end user friendly. The reason I don't like suppressing this in the ini file is it becomes a pain in the ass to try and debug a customer's problem (with the customer on the phone), if no error messages are showing on the screen for him/her.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@xxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux