|
<?php $exception->getFile(),
|
|
<?php $exception->getLine(),
|
|
<?php $exception->getTraceAsString()
|
|
<?php );
|
|
<?php trigger_error($message, E_USER_ERROR);
|
|
<?php }
|
|
<?php
|
|
<?php /**
|
|
<?php * Method that can be easily stubbed in testing.
|
Arguments
|
<?php $this->_handled = true;
|
|
<?php [$error, $log] = static::mapErrorCode($code);
|
|
<?php if ($log === LOG_ERR) {
|
|
<?php /** @psalm-suppress PossiblyNullArgument */
|
|
<?php return $this->handleFatalError($code, $description, $file, $line);
|
|
<?php }
|
|
<?php $data = [
|
|
<?php 'level' => $log,
|
|
<?php 'code' => $code,
|
|
<?php $exception->getFile(),
|
|
<?php $exception->getLine(),
|
|
<?php $exception->getTraceAsString()
|
|
<?php );
|
|
<?php trigger_error($message, E_USER_ERROR);
|
|
<?php }
|
|
<?php
|
|
<?php /**
|
|
<?php * Method that can be easily stubbed in testing.
|
|
<?php );
|
|
<?php $response = $renderer->render();
|
|
<?php $this->_sendResponse($response);
|
|
<?php } catch (Throwable $exception) {
|
|
<?php $this->_logInternalError($exception);
|
|
<?php }
|
|
<?php }
|
|
<?php
|
|
<?php /**
|
|
<?php * @see https://secure.php.net/manual/en/function.set-exception-handler.php
|
|
<?php */
|
|
<?php public function handleException(Throwable $exception): void
|
|
<?php {
|
|
<?php $this->_displayException($exception);
|
|
<?php $this->logException($exception);
|
|
<?php $code = $exception->getCode() ?: 1;
|
|
<?php $this->_stop((int)$code);
|
|
<?php }
|
If you want to customize this error message, create
templates/Error/error500.php