user_error() default error type
| From: | Christian Dechery | Date: | Wed, 28 Feb 2001 16:19:21 +0000 |
| Subject: | user_error() default error type | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-42025@lists.php.net to get a copy of this message | ||
Can't I change the default value for error type in user_error or trigger_error?
I wanted to echo an error everytime a query failed because of syntax errors so I'd to something like:
$q="select * from bogustable";
mysql_query($q) or trigger_error(mysql_error()." in ".$q,E_USER_ERROR);
-----------------> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
kinda BIG don't u think?
this would do exactly what I need when an query fails cuz of syntax error:
- echoes the error, the query and the line of code
- stop the execution of the script
I NEED all of those, and that E_USER_ERROR in every call is making that function call get huge. Isn't there a way I can't default it to that instead of E_USER_NOTICE (which doesn't really help)...
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer