XPath: evaluate_node_set (and select_nodes/select_single_node) now throw exception if expression return type is not node set (instead of assertion)

git-svn-id: http://pugixml.googlecode.com/svn/trunk@223 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
arseny.kapoulkine 2009-11-08 14:34:59 +00:00
parent 74737f97ba
commit 6783bf0c32

View file

@ -3679,6 +3679,7 @@ namespace pugi
xpath_node_set xpath_query::evaluate_node_set(const xml_node& n) const
{
if (!m_root) return xpath_node_set();
if (m_root->rettype() != ast_type_node_set) throw xpath_exception("Expression does not evaluate to node set");
xpath_context c;