From: Carl Hetherington Date: Mon, 12 Jan 2015 15:34:29 +0000 (+0000) Subject: Better error. X-Git-Tag: v0.12.0~12 X-Git-Url: https://main.carlh.net/gitweb/?p=libcxml.git;a=commitdiff_plain;h=ed42a32b67257991630509ad81162d27ee2e8fe1 Better error. --- diff --git a/src/cxml.cc b/src/cxml.cc index 756dd2a..1d98529 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -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 (); }