You are here

function devel_set_handler in Devel 6

Same name and namespace in other branches
  1. 8.3 devel.module \devel_set_handler()
  2. 8 devel.module \devel_set_handler()
  3. 8.2 devel.module \devel_set_handler()
  4. 7 devel.module \devel_set_handler()
  5. 4.x devel.module \devel_set_handler()
1 call to devel_set_handler()
devel_init in ./devel.module
Implementation of hook_init().

File

./devel.module, line 400

Code

function devel_set_handler($handler) {
  switch ($handler) {
    case DEVEL_ERROR_HANDLER_STANDARD:

      // do nothing
      break;
    case DEVEL_ERROR_HANDLER_BACKTRACE:
    case DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE:
      if (has_krumo()) {
        set_error_handler('backtrace_error_handler');
      }
      break;
    case DEVEL_ERROR_HANDLER_NONE:
      restore_error_handler();
      break;
  }
}