On 07/12/2004, at 6:50 AM, Al wrote:
Jason Wong wrote:On Monday 06 December 2004 14:19, Rory Browne wrote:If I'm not mistaken Al wanted to return something if the thing failed,You can have:
without having to put it inside an if_block.
I'm watching this with curiosity, because return is a language construct, and not a function, or anything that has a value.
... OR $error = "Oh dear";
But the say I see it, eventually, somewhere in your code you need to test for it. Essentially you're just moving the test somewhere else.
Essentially, I'm creating warning reports for my users, not code errors. The users can then email the warnings to our webmaster.
That's totally the wrong approach. Dumping errors to the screen and asking the end user to create an email for the webmaster is just a fantasy. 99% of users will walk away and never return. It's bad user experience, and it's a crisis point that you're handling badly.
A better plan would be to hide all the errors from the user, log them to and error log, automatically email the webmaster, and present a simple "something went wrong, sorry, we're working on it" to the user.
They don't need to know anything about mysql, tables, databases, etc -- the WEBMASTER does, but not the user.
--- Justin French, Indent.com.au justin.french@xxxxxxxxxxxxx Web Application Development & Graphic Design
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php