"Gabor Hojtsy" <[EMAIL PROTECTED]> wrote in message 
005101c1990c$bac51520$281ca3d5@Mia">news:005101c1990c$bac51520$281ca3d5@Mia...
| > +1 for trigger_error(); -1 for user_error: alias for trigger_error

+1 for trigger_error(); -1 for user_error, so do I.

IMHO, the main point is that using trigger_error() makes example codes 
much simpler and understandable, beside being a very big hammer in
customizing your error reporting and handling.
(displaying a static.html page with "BIG ERROR" messages or whatsoever,
logging it wherever you want, stops execution when you want.)

I'm for using trigger_error().

| 
| > $conn = mysql_connect(...) or user_error("Cannot connect", E_USER_ERROR);
| > lacks flexibility, not in error_handling but the in the or construct.
| Philip
| > Olson dropped a note about this in a recent mail.

I'll check it, but you can write still:

$connect = mysql_connect(...);
if ($connect === FALSE) {
    trigger_error(...);
}


-- 
Gyozo Papp
- [EMAIL PROTECTED] 


Reply via email to