diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-27 12:47:17 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-27 12:47:17 +0100 |
| commit | 082d6561785efb6edf22ca42ac04e809c6c92d43 (patch) | |
| tree | bb227834a734b5d79f77d1f77d50539b0573547b | |
| parent | 9848bbe16ac822a2c089422e83194113e77d8433 (diff) | |
Make ContentVersion Id node optional. Improve error message slightly.
| -rw-r--r-- | src/cpl.cc | 2 | ||||
| -rw-r--r-- | src/xml.cc | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -50,7 +50,7 @@ CPL::CPL (string file) ContentVersion::ContentVersion (xmlpp::Node const * node) : XMLNode (node) { - id = string_node ("Id"); + id = optional_string_node ("Id"); label_text = string_node ("LabelText"); done (); } @@ -31,7 +31,7 @@ XMLNode::xml_node (string name) if (n.size() > 1) { throw XMLError ("duplicate XML tag " + name); } else if (n.empty ()) { - throw XMLError ("missing XML tag " + name); + throw XMLError ("missing XML tag " + name + " in " + _node->get_name()); } return n.front (); |
