diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2008-06-03 15:41:34 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2008-06-03 15:41:34 +0400 |
commit | 2fd35a1f5cf8e09cec54e531d6d740ea4183d374 (patch) | |
tree | 94f59e78c8d0d1d6a0653d66105af2e4dc12fb84 /mcs/class/System.XML/System.Xml.XPath | |
parent | 26a6b211f33f1f2e8c7cb39443306b090ed5f8b4 (diff) |
2008-06-03 Atsushi Enomoto <atsushi@ximian.com>
* Expression.cs : help diagnose variable resolution failure.
svn path=/trunk/mcs/; revision=104745
Diffstat (limited to 'mcs/class/System.XML/System.Xml.XPath')
-rw-r--r-- | mcs/class/System.XML/System.Xml.XPath/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System.XML/System.Xml.XPath/Expression.cs | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/mcs/class/System.XML/System.Xml.XPath/ChangeLog b/mcs/class/System.XML/System.Xml.XPath/ChangeLog index 324a8b209d0..dbb6430f6ba 100644 --- a/mcs/class/System.XML/System.Xml.XPath/ChangeLog +++ b/mcs/class/System.XML/System.Xml.XPath/ChangeLog @@ -1,3 +1,7 @@ +2008-06-03 Atsushi Enomoto <atsushi@ximian.com> + + * Expression.cs : help diagnose variable resolution failure. + 2008-04-02 Atsushi Enomoto <atsushi@ximian.com> * XPathNavigator.cs : fixed InnerXml to not give up with root node. diff --git a/mcs/class/System.XML/System.Xml.XPath/Expression.cs b/mcs/class/System.XML/System.Xml.XPath/Expression.cs index 8acb84da148..b690a8b2008 100644 --- a/mcs/class/System.XML/System.Xml.XPath/Expression.cs +++ b/mcs/class/System.XML/System.Xml.XPath/Expression.cs @@ -1862,6 +1862,8 @@ namespace System.Xml.XPath else var = context.ResolveVariable (new XmlQualifiedName (_name.Name, _name.Namespace)); } + else + throw new XPathException (String.Format ("XSLT context is required to resolve variable. Current namespace manager in current node-set '{0}' is '{1}'", iter.GetType (), iter.NamespaceManager != null ? iter.NamespaceManager.GetType () : null)); if (var == null) throw new XPathException ("variable "+_name.ToString ()+" not found"); |