/** * @param Route $route * @param \Exception $exception * @return RouteException */ public function __invoke(Route $route, \Exception $exception) { $this->route->set(RouteException::EXCEPTION, $exception); $this->route->set(RouteException::ROUTE, $route); return $this->route; }
/** * @param RouteException $route * @return ViewModel */ public function __invoke(RouteException $route) { return $this->exception($route->route(), $route->exception()); }