Rename method

This commit is contained in:
Franz Liedke 2019-08-20 19:45:42 +02:00
parent ad25307e68
commit 7dbdd8c024
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4
4 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ class HandledError
return $this;
}
public function getError(): Throwable
public function getException(): Throwable
{
return $this->error;
}

View File

@ -56,7 +56,7 @@ class ViewFormatter implements HttpFormatter
public function format(HandledError $error, Request $request): Response
{
$view = $this->view->make($this->determineView($error))
->with('error', $error->getError())
->with('error', $error->getException())
->with('message', $this->getMessage($error));
return new HtmlResponse($view->render(), $error->getStatusCode());

View File

@ -28,7 +28,7 @@ class WhoopsFormatter implements HttpFormatter
{
public function format(HandledError $error, Request $request): Response
{
return WhoopsRunner::handle($error->getError(), $request)
return WhoopsRunner::handle($error->getException(), $request)
->withStatus($error->getStatusCode());
}
}

View File

@ -62,7 +62,7 @@ class HandleErrors implements Middleware
if ($error->shouldBeReported()) {
foreach ($this->reporters as $reporter) {
$reporter->report($error);
$reporter->report($error->getException());
}
}