function devel_set_handler in Devel 8.2
Same name and namespace in other branches
- 8.3 devel.module \devel_set_handler()
- 8 devel.module \devel_set_handler()
- 6 devel.module \devel_set_handler()
- 7 devel.module \devel_set_handler()
- 4.x devel.module \devel_set_handler()
Sets a new error handler or restores the prior one.
1 call to devel_set_handler()
- ErrorHandlerSubscriber::registerErrorHandler in src/
EventSubscriber/ ErrorHandlerSubscriber.php - Register devel error handler.
File
- ./
devel.module, line 168 - This module holds functions useful for Drupal development.
Code
function devel_set_handler($handlers) {
if (empty($handlers)) {
restore_error_handler();
}
elseif (count($handlers) == 1 && isset($handlers[DEVEL_ERROR_HANDLER_STANDARD])) {
// Do nothing.
}
else {
set_error_handler('backtrace_error_handler');
}
}