Re: Coding Question

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

 




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,
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.
You can have:
... 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


[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