Better error.
authorCarl Hetherington <cth@carlh.net>
Mon, 12 Jan 2015 15:34:29 +0000 (15:34 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 12 Jan 2015 15:34:29 +0000 (15:34 +0000)
src/cxml.cc

index 756dd2a8c10bcd688f910eaa5e6bd795b12ca5d2..1d98529bdd0b08f49a08140355a085c79024eb94 100644 (file)
@@ -284,7 +284,7 @@ cxml::Document::take_root_node ()
 
        _node = _parser->get_document()->get_root_node ();
        if (!_root_name.empty() && _node->get_name() != _root_name) {
-               throw cxml::Error ("unrecognised root node");
+               throw cxml::Error ("unrecognised root node " + _node->get_name() + "(expecting " + _root_name + ")");
        } else if (_root_name.empty ()) {
                _root_name = _node->get_name ();
        }