Better error.
authorCarl Hetherington <cth@carlh.net>
Fri, 9 Jan 2015 22:45:05 +0000 (22:45 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 9 Jan 2015 22:45:05 +0000 (22:45 +0000)
src/cxml.cc

index 2aad081d346bd4bc56e008864501b1c2e9348880..756dd2a8c10bcd688f910eaa5e6bd795b12ca5d2 100644 (file)
@@ -142,12 +142,12 @@ cxml::Node::string_attribute (string name) const
 {
        xmlpp::Element const * e = dynamic_cast<const xmlpp::Element *> (_node);
        if (!e) {
 {
        xmlpp::Element const * e = dynamic_cast<const xmlpp::Element *> (_node);
        if (!e) {
-               throw cxml::Error ("missing attribute");
+               throw cxml::Error ("missing attribute " + name);
        }
        
        xmlpp::Attribute* a = e->get_attribute (name);
        if (!a) {
        }
        
        xmlpp::Attribute* a = e->get_attribute (name);
        if (!a) {
-               throw cxml::Error ("missing attribute");
+               throw cxml::Error ("missing attribute " + name);
        }
 
        return a->get_value ();
        }
 
        return a->get_value ();