$Date: 2004/08/07 14:28:59 $
This example requires :
This example will show you how to handle html_progress errors with a dbms.
An error was volontary made on call of setAnimSpeed method (line 80). As it's an API error, default is to return error after it was raised, so lines below line 81 will be executed. Error is also logged into table 'log_table' of database 'test'.
We have defined (lines 4 to 44) a new user error handler for html_progress (line 77). In this handler, we will send error message on browser by using PEAR_Error (print mode) object (lines 11 to 16). We will also logged the same error content on a database (lines 18 to 41). DB account is defined on lines 49 to 53 (and only there).
Print out errors (as a part of the output). For production web sites, you're strongly encouraged to turn this feature off, and use error logging instead. Keeping display_errors enabled on a production web site may reveal security information to end users, such as file paths on your Web server, your database schema or other information.
1 | ini_set('display_errors', false); |
Log errors into a log file (server-specific log, stderr, syslog ...) As stated above, you're strongly advised to use error logging in place of error displaying on production web sites.
1 | ini_set('log_errors', true); |
Default options below are used :
Only option changed is :
[Top]
HTML Progress Error : invalid input, parameter #1 "$delay" was expecting "less or equal 1000", instead got "10000"
Previous error has been recorded in database 'test', table 'log_table'
[Top]
[Top]