Skip to content

Commit 9f3ce9e

Browse files
committed
Merge pull request #23 from nguyenk/7.0
passing to Http500HandlerInterface::server error (lnked to thecodingmachine/mvc.splash#21)
2 parents a387bbe + c56bee6 commit 9f3ce9e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Mouf/Mvc/Splash/Routers/ExceptionRouter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(Http500HandlerInterface $errorController, LoggerInte
5151
*
5252
* @return ResponseInterface
5353
*/
54-
private function handleException(\Exception $e)
54+
private function handleException(\Exception $e, Request $request)
5555
{
5656
if ($this->log != null) {
5757
$this->log->error('Exception thrown inside a controller.', array(
@@ -63,8 +63,8 @@ private function handleException(\Exception $e)
6363
}
6464

6565
$response = SplashUtils::buildControllerResponse(
66-
function () use ($e) {
67-
return $this->errorController->serverError($e);
66+
function () use ($e, $request) {
67+
return $this->errorController->serverError($e, $request);
6868
}
6969
);
7070

@@ -89,6 +89,6 @@ function () use ($e) {
8989
*/
9090
public function __invoke($error, Request $request, Response $response, callable $out = null)
9191
{
92-
return $this->handleException($error);
92+
return $this->handleException($error, $request);
9393
}
9494
}

0 commit comments

Comments
 (0)