function devel_set_handler

Same name in other branches
  1. 7.x-1.x devel.module \devel_set_handler()
  2. 5.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 171

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');
    }
}