diff options
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI')
-rw-r--r-- | mcs/class/System.Web/System.Web.UI/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.Web/System.Web.UI/RootBuilder.cs | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog index 654e9f2a13c..8d51ad1fa39 100644 --- a/mcs/class/System.Web/System.Web.UI/ChangeLog +++ b/mcs/class/System.Web/System.Web.UI/ChangeLog @@ -1,3 +1,8 @@ +2003-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * RootBuilder.cs: throw exception when the tagprefix is not valid or + not found. + 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com> * TemplateControlParser.cs: return after processing @Register. 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); } |