string
cxml::Node::name () const
{
- assert (_node);
+ if (!_node) {
+ throw Error ("No node to read name from");
+ }
return _node->get_name ();
}
list<shared_ptr<cxml::Node> >
cxml::Node::node_children () const
{
+ if (!_node) {
+ throw Error ("No node to read children from");
+ }
xmlpp::Node::NodeList c = _node->get_children ();
list<shared_ptr<cxml::Node> > n;