A error handler's configuration is determined by the arguments used in
its construction. Here's an overview of these parameters.
-
<?php
-
require_once 'HTML/Progress2.php';
-
-
$errorConf =
array('error_handler'
=> 'myErrorHandler',
-
'push_callback' => 'myError',
-
// ... more options
-
);
-
$meter =
new HTML_Progress2($errorConf);
-
?>
Table 16.1. Error Handler configuration parameters
Option
|
Type
|
Description
|
error_handler
|
callback
|
A valid callback (function) to manage errors raised by the
HTML_Progress2::raiseError()
method. Default is: HTML_Progress2::_errorHandler
|
push_callback
|
callback
|
A valid callback (function) that decides to following action.
Default return: PEAR_ERROR_DIE if
exception, NULL otherwise.
|
message_callback
|
callback
|
A valid callback (function) to control message generation.
Default is: HTML_Progress2_Error::_msgCallback
|
context_callback
|
callback
|
A valid callback (function) to control error context
generation. Default is: HTML_Progress2_Error::getBacktrace
|
handler
|
mixed
|
any handler-specific settings
|