mirror of
https://github.com/flarum/core.git
synced 2025-07-20 00:01:17 +02:00
Merge pull request #1178 from flarum/Luceos-patch-1
Update HandleErrors.php
This commit is contained in:
@@ -60,11 +60,11 @@ class HandleErrors
|
|||||||
try {
|
try {
|
||||||
return $out($request, $response);
|
return $out($request, $response);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return $this->formatException($e);
|
return $this->formatException($e, $request, $response, $out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function formatException(Exception $error)
|
protected function formatException(Exception $error, Request $request, Response $response, callable $out = null)
|
||||||
{
|
{
|
||||||
$status = 500;
|
$status = 500;
|
||||||
$errorCode = $error->getCode();
|
$errorCode = $error->getCode();
|
||||||
|
Reference in New Issue
Block a user