Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI/RootBuilder.cs')
-rw-r--r--mcs/class/System.Web/System.Web.UI/RootBuilder.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/mcs/class/System.Web/System.Web.UI/RootBuilder.cs b/mcs/class/System.Web/System.Web.UI/RootBuilder.cs
index e2d96015d40..133ce52b5c8 100644
--- a/mcs/class/System.Web/System.Web.UI/RootBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/RootBuilder.cs
@@ -65,6 +65,9 @@ namespace System.Web.UI
string cname;
int colon = tagName.IndexOf (':');
if (colon != -1) {
+ if (colon == 0)
+ throw new Exception ("Empty TagPrefix is not valid");
+
if (colon + 1 == tagName.Length)
return null;
@@ -78,6 +81,8 @@ namespace System.Web.UI
Type t = foundry.GetComponentType (prefix, cname);
if (t != null)
return t;
+ else if (prefix != "")
+ throw new Exception ("TagPrefix " + prefix + " not registered");
return LookupHtmlControls (tagName, attribs);
}