Dynamically Typed has a new posting today that might be of interest to anyone looking to handle their user's errors in their own custom way - using trigger_error and its friends.
The < ahref="http://au.php.net/trigger_error">trigger_error function in PHP allows you to generate a PHP error on demand. If you haven't used this function before, you may be asking, "Why would you want to generate an error?" Well, it is a much more flexible solution than using or die to display your error message.
[...] On a test server, you can turn display_errors on and the error, complete with line number and source file, will be displayed on screen. On a live server, you can turn it off, and instead enable log_errors and the error message, complete with line number and source file, will be output to your error log.
There is also the suggestion (via one of the comments) that this method might not be the best for error handling the flow of the applicaction, and that one might want to use PEAR::Error to accomplish this task...




