Commit 433ec13b authored by Tino Goratsch's avatar Tino Goratsch

display the 404 page if the controller argument resolver throws an exception

parent 3799826d
......@@ -138,7 +138,15 @@ class ControllerActionDispatcher
$callable = $this->getCallable($controller);
if (empty($arguments)) {
$arguments = $this->argumentResolver->getArguments($this->request->getSymfonyRequest(), $callable);
try {
$arguments = $this->argumentResolver->getArguments($this->request->getSymfonyRequest(), $callable);
} catch (\RuntimeException $e) {
throw new ControllerActionNotFoundException(
$e->getMessage(),
0,
$e
);
}
}
return \call_user_func_array($callable, $arguments);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment