public static string BuildPathUri(ICatalogItemContext currentICatalogItemContext, bool checkProtocol, string initialUrl, NameValueCollection unparsedParameters, out ICatalogItemContext newContext) { newContext = null; if (currentICatalogItemContext == null) { return(initialUrl); } string text = null; try { text = currentICatalogItemContext.CombineUrl(initialUrl, checkProtocol, unparsedParameters, out newContext); } catch (RSException) { throw; } catch (Exception) { throw new RenderingObjectModelException(ErrorCode.rsMalformattedURL); } if (!currentICatalogItemContext.IsSupportedProtocol(text, checkProtocol)) { throw new RenderingObjectModelException(ErrorCode.rsUnsupportedURLProtocol, text.MarkAsPrivate()); } return(text); }