- throw new ParamNotConvertedException(sprintf('The "%s" parameter was not converted for the path "%s" (route name: "%s")', $name, $route->getPath(), $defaults[RouteObjectInterface::ROUTE_NAME]));
+ $message = 'The "%s" parameter was not converted for the path "%s" (route name: "%s")';
+ $route_name = $defaults[RouteObjectInterface::ROUTE_NAME];
+ throw new ParamNotConvertedException(sprintf($message, $name, $route->getPath(), $route_name), 0, NULL, $route_name, [$name => $value]);