Re: coding standards - draft

From: Date: Wed, 09 Jan 2002 21:01:25 +0000
Subject: Re: coding standards - draft
References: 1 2 3 4 5 6  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969341014@lists.php.net to get a copy of this message
"Gabor Hojtsy" <goba@php.net> wrote in message 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 - gerzson@php.net

« previous php.doc (#969341014) next »