From: Carl Hetherington Date: Fri, 9 Jan 2015 22:45:05 +0000 (+0000) Subject: Better error. X-Git-Tag: v0.12.0~13 X-Git-Url: https://main.carlh.net/gitweb/?p=libcxml.git;a=commitdiff_plain;h=735649849ceb024520491a7acf4e4c18ce3f4884 Better error. --- diff --git a/src/cxml.cc b/src/cxml.cc index 2aad081..756dd2a 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -142,12 +142,12 @@ cxml::Node::string_attribute (string name) const { xmlpp::Element const * e = dynamic_cast (_node); if (!e) { - throw cxml::Error ("missing attribute"); + throw cxml::Error ("missing attribute " + name); } xmlpp::Attribute* a = e->get_attribute (name); if (!a) { - throw cxml::Error ("missing attribute"); + throw cxml::Error ("missing attribute " + name); } return a->get_value ();