function _drupal_exception_handler_additional in Drupal 8
Same name and namespace in other branches
- 9 core/includes/bootstrap.inc \_drupal_exception_handler_additional()
Displays any additional errors caught while handling an exception.
Parameters
\Exception|\Throwable $exception: The first exception object that was thrown.
\Exception|\Throwable $exception2: The second exception object that was thrown.
1 call to _drupal_exception_handler_additional()
- _drupal_exception_handler in core/
includes/ bootstrap.inc - Provides custom PHP exception handling.
File
- core/
includes/ bootstrap.inc, line 634 - Functions that need to be loaded on every Drupal request.
Code
function _drupal_exception_handler_additional($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>' . Error::renderExceptionSafe($exception) . '</p>';
print '<h2>Additional</h2><p>' . Error::renderExceptionSafe($exception2) . '</p><hr />';
}
}