src/Viserio/Component/Routing/Generator/UrlGenerator.php
public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string
    {
        $routes = $this->routes;

        if (($route = $routes->getByName($name)) !== null || ($route = $routes->getByAction($name)) !== null) {
            return $this->toRoute($route, $parameters, $referenceType);
        }

        throw new RouteNotFoundException(\sprintf('Unable to generate a URL for the named/action route [%s] as such route does not exist.', $name));
    }
public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string
    {
        $routes = $this->routes;

        if (($route = $routes->getByName($name)) !== null || ($route = $routes->getByAction($name)) !== null) {
            return $this->toRoute($route, $parameters, $referenceType);
        }

        throw new RouteNotFoundException(\sprintf('Unable to generate a URL for the named/action route [%s] as such route does not exist.', $name));
    }
{@inheritdoc}