if ($this->config->log === true && !
in_array($statusCode,
$this->config->ignoreCodes, true
)) { log_message('critical', "{message}\nin {exFile} on line {exLine}.\n{trace}",
[ 'message' =>
$exception->
getMessage(),
'exFile' =>
clean_path($exception->
getFile()), // {file} refers to THIS file
'exLine' =>
$exception->
getLine(), // {line} refers to THIS line
'trace' => self::
renderBacktrace($exception->
getTrace()),
]);
} $this->request = Services::
request();
$this->response = Services::
response();
// Get the first exception.
while ($prevException =
$exception->
getPrevious()) { $exception =
$prevException;
} if (method_exists($this->config, 'handler'
)) { // Use new ExceptionHandler
$handler =
$this->config->
handler($statusCode,
$exception);
$handler->
handle( $exception,