diff --git a/framework/core/src/Foundation/ErrorHandling/HandledError.php b/framework/core/src/Foundation/ErrorHandling/HandledError.php index 55b57d5d7..5e149fca3 100644 --- a/framework/core/src/Foundation/ErrorHandling/HandledError.php +++ b/framework/core/src/Foundation/ErrorHandling/HandledError.php @@ -47,7 +47,7 @@ class HandledError return $this; } - public function getError(): Throwable + public function getException(): Throwable { return $this->error; } diff --git a/framework/core/src/Foundation/ErrorHandling/ViewFormatter.php b/framework/core/src/Foundation/ErrorHandling/ViewFormatter.php index d40ca2ca4..d38ee523b 100644 --- a/framework/core/src/Foundation/ErrorHandling/ViewFormatter.php +++ b/framework/core/src/Foundation/ErrorHandling/ViewFormatter.php @@ -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()); diff --git a/framework/core/src/Foundation/ErrorHandling/WhoopsFormatter.php b/framework/core/src/Foundation/ErrorHandling/WhoopsFormatter.php index 7f2d26456..2e8ee2505 100644 --- a/framework/core/src/Foundation/ErrorHandling/WhoopsFormatter.php +++ b/framework/core/src/Foundation/ErrorHandling/WhoopsFormatter.php @@ -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()); } } diff --git a/framework/core/src/Http/Middleware/HandleErrors.php b/framework/core/src/Http/Middleware/HandleErrors.php index d423d653c..691e9daf9 100644 --- a/framework/core/src/Http/Middleware/HandleErrors.php +++ b/framework/core/src/Http/Middleware/HandleErrors.php @@ -62,7 +62,7 @@ class HandleErrors implements Middleware if ($error->shouldBeReported()) { foreach ($this->reporters as $reporter) { - $reporter->report($error); + $reporter->report($error->getException()); } }