function error_displayable

You are here

7 error_displayable($error = NULL)
8 error_displayable($error = NULL)

Determines whether an error should be displayed.

When in maintenance mode or when error_level is ERROR_REPORTING_DISPLAY_ALL, all errors should be displayed. For ERROR_REPORTING_DISPLAY_SOME, $error will be examined to determine if it should be displayed.


$error: Optional error to examine for ERROR_REPORTING_DISPLAY_SOME.

Return value

TRUE if an error should be displayed.

5 calls to error_displayable()
ExceptionController::on500Html in core/lib/Drupal/Core/Controller/ExceptionController.php
Processes a generic exception into an HTTP 500 response.
SessionHandler::write in core/lib/Drupal/Core/Session/SessionHandler.php
Commit session to storage.
_drupal_exception_handler in core/includes/
Provides custom PHP exception handling.
_drupal_log_error in core/includes/
Logs a PHP error or exception and displays an error page in fatal cases.
_drupal_shutdown_function in core/includes/
Executes registered shutdown functions.


core/includes/, line 98
Functions for error handling.


function error_displayable($error = NULL) {
  if (defined('MAINTENANCE_MODE')) {
    return TRUE;
  $error_level = _drupal_get_error_level();
    return TRUE;
  if ($error_level == ERROR_REPORTING_DISPLAY_SOME && isset($error)) {
    return $error['%type'] != 'Notice' && $error['%type'] != 'Strict warning';
  return FALSE;