From 735649849ceb024520491a7acf4e4c18ce3f4884 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 9 Jan 2015 22:45:05 +0000 Subject: [PATCH] Better error. --- src/cxml.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 (); -- 2.30.2