This example will show you how to ignore HTML_Progress2 errors but keep them in stack.
Exceptions will be ignored as all other errors, so line 49 will be reached !
As you can see on browser screen, error are kept in stack with informations (code, level, params) and it's up to you to choose to display them or not (lines 40-47).
3 errors has occured
error #1
Array
(
[code] => -100
[level] => exception
[params] => Array
(
[var] => $min
[was] => string
[expected] => integer
[paramnum] => 3
)
)
error #2
Array
(
[code] => -100
[level] => error
[params] => Array
(
[var] => $min
[was] => -1
[expected] => positive
[paramnum] => 1
)
)
error #3
Array
(
[code] => -100
[level] => exception
[params] => Array
(
[var] => $continuous
[was] => string
[expected] => boolean
[paramnum] => 1
)
)
still alive !
For security reasons live demo is not available
This example requires mandatory resources :
On example A, all errors will be proceed by the user error handler defined by option error_handler (line 28). This function myErrorHandler declared on lines 21-24, returns NULL value because we have decided to ignore all errors and do nothing.
Option | Value | Default |
---|---|---|
error_handler | myErrorHandler | HTML_Progress2::_errorHandler |
Default behaviour is to kept errors in stack, and especially basic informations (code, level, params) if the error_handler function returns NULL.