mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 23:45:17 +08:00
Rename method
This commit is contained in:
parent
ad25307e68
commit
7dbdd8c024
|
@ -47,7 +47,7 @@ class HandledError
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getError(): Throwable
|
||||
public function getException(): Throwable
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ class HandleErrors implements Middleware
|
|||
|
||||
if ($error->shouldBeReported()) {
|
||||
foreach ($this->reporters as $reporter) {
|
||||
$reporter->report($error);
|
||||
$reporter->report($error->getException());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user