function _drupal_exception_handler

cis7 _drupal_exception_handler($exception)
cle7 _drupal_exception_handler($exception)
elmsmedia7 _drupal_exception_handler($exception)
icor7 _drupal_exception_handler($exception)
meedjum_blog7 _drupal_exception_handler($exception)
mooc7 _drupal_exception_handler($exception)

Provides custom PHP exception handling.

Uncaught exceptions are those not enclosed in a try/catch block. They are always fatal: the execution of the script will stop as soon as the exception handler exits.


$exception: The exception object that was thrown.

2 string references to '_drupal_exception_handler'
_drupal_bootstrap_configuration in includes/
Sets up the script environment and loads settings.php.
_drupal_get_last_caller in includes/
Gets the last caller from a backtrace.


includes/, line 2326
Functions that need to be loaded on every Drupal request.


function _drupal_exception_handler($exception) {
  require_once DRUPAL_ROOT . '/includes/';

  try {
    // Log the message to the watchdog and return an error page to the user.
    _drupal_log_error(_drupal_decode_exception($exception), TRUE);
  catch (Exception $exception2) {
    // Another uncaught exception was thrown while handling the first one.
    // If we are displaying errors, then do so with no possibility of a further uncaught exception being thrown.
    if (error_displayable()) {
      print '<h1>Additional uncaught exception thrown while handling exception.</h1>';
      print '<h2>Original</h2><p>' . _drupal_render_exception_safe($exception) . '</p>';
      print '<h2>Additional</h2><p>' . _drupal_render_exception_safe($exception2) . '</p><hr />';



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.