function PEAR::pushErrorHandling in Flickr API 5
Push a new error handler on top of the error handler options stack. With this you can easily override the actual error handler for some code and restore it later with popErrorHandling.
Parameters
mixed $mode (same as setErrorHandling):
mixed $options (same as setErrorHandling):
Return value
bool Always true
See also
PEAR::setErrorHandling
2 calls to PEAR::pushErrorHandling()
- DB_mysql::nextId in phpFlickr/
PEAR/ DB/ mysql.php - Returns the next free id in a sequence
- DB_pgsql::nextId in phpFlickr/
PEAR/ DB/ pgsql.php - Returns the next free id in a sequence
File
- phpFlickr/
PEAR/ PEAR.php, line 685
Class
- PEAR
- Base class for other PEAR classes. Provides rudimentary emulation of destructors.
Code
function pushErrorHandling($mode, $options = null) {
$stack =& $GLOBALS['_PEAR_error_handler_stack'];
if (isset($this) && is_a($this, 'PEAR')) {
$def_mode =& $this->_default_error_mode;
$def_options =& $this->_default_error_options;
}
else {
$def_mode =& $GLOBALS['_PEAR_default_error_mode'];
$def_options =& $GLOBALS['_PEAR_default_error_options'];
}
$stack[] = array(
$def_mode,
$def_options,
);
if (isset($this) && is_a($this, 'PEAR')) {
$this
->setErrorHandling($mode, $options);
}
else {
PEAR::setErrorHandling($mode, $options);
}
$stack[] = array(
$mode,
$options,
);
return true;
}