Issue #1536868 by superspring: Fixed No trace when database is down.

8.0.x
catch 2012-11-20 11:40:05 +00:00
parent 983bfd1ea6
commit 62f6333ac3
1 changed files with 5 additions and 3 deletions

View File

@ -3403,12 +3403,14 @@ function _drupal_shutdown_function() {
} }
} }
catch (Exception $exception) { catch (Exception $exception) {
// If we are displaying errors, then do so with no possibility of a further uncaught exception being thrown. // If we are displaying errors, then do so with no possibility of a further
require_once DRUPAL_ROOT . '/core/includes/errors.inc'; // uncaught exception being thrown.
if (error_displayable()) { require_once DRUPAL_ROOT . '/core/includes/errors.inc';
if (error_displayable()) {
print '<h1>Uncaught exception thrown in shutdown function.</h1>'; print '<h1>Uncaught exception thrown in shutdown function.</h1>';
print '<p>' . _drupal_render_exception_safe($exception) . '</p><hr />'; print '<p>' . _drupal_render_exception_safe($exception) . '</p><hr />';
} }
error_log($exception);
} }
} }