if ($this->
isErrorDisplayable($error)) { // If error type is 'User notice' then treat it as debug information
// instead of an error message.
if ($error['%type'
] == 'User notice'
) { $error['%type'
] = 'Debug';
} $error =
$this->
simplifyFileInError($error);
unset($error['backtrace'
],
$error['exception'
],
$error['severity_level'
]);
if (!
$this->
isErrorLevelVerbose()) { // Without verbose logging, use a simple message.
// We use \Drupal\Component\Render\FormattableMarkup directly here,
// rather than use t() since we are in the middle of error handling, and
// we don't want t() to cause further errors.
$message =
new FormattableMarkup(Error::DEFAULT_ERROR_MESSAGE,
$error);
} else { // With verbose logging, we will also include a backtrace.
$backtrace_exception =
$exception;