Bläddra i källkod

2007-09-12 Juraj Skripsky <[email protected]>

	* StaticSiteMapProvider.cs (AddNode): Add message text to
	InvalidOperationException (duplicate url case).

svn path=/trunk/mcs/; revision=85674
Juraj Skripsky 18 år sedan
förälder
incheckning
ee818513f4

+ 5 - 0
mcs/class/System.Web/System.Web/ChangeLog

@@ -1,3 +1,8 @@
+2007-09-12  Juraj Skripsky <[email protected]>
+
+	* StaticSiteMapProvider.cs (AddNode): Add message text to
+	InvalidOperationException (duplicate url case).
+
 2007-09-06  Marek Habersack  <[email protected]>
 
 	* HttpCachePolicy.cs: implemented setting the ETag and

+ 5 - 1
mcs/class/System.Web/System.Web/StaticSiteMapProvider.cs

@@ -57,7 +57,11 @@ namespace System.Web
 					url = MapUrl (url);
 
 					if (FindSiteMapNode (url) != null)
-						throw new InvalidOperationException ();
+						throw new InvalidOperationException (String.Format (
+							"Multiple nodes with the same URL '{0}' were found. " + 
+							"StaticSiteMapProvider requires that sitemap nodes have unique URLs.",
+							node.Url
+						));
 				
 					UrlToNode [url] = node;
 				}