projects
/
libdcp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9848bbe
)
Make ContentVersion Id node optional. Improve error message slightly.
author
Carl Hetherington
<cth@carlh.net>
Mon, 27 Aug 2012 11:47:17 +0000
(12:47 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 27 Aug 2012 11:47:17 +0000
(12:47 +0100)
src/cpl.cc
patch
|
blob
|
history
src/xml.cc
patch
|
blob
|
history
diff --git
a/src/cpl.cc
b/src/cpl.cc
index 649d54b7aeb1c257e01df9c0a4fc7005296ddf37..80962f4fffca14e13d96de0160db1b8aa4e5744a 100644
(file)
--- a/
src/cpl.cc
+++ b/
src/cpl.cc
@@
-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 ();
}
diff --git
a/src/xml.cc
b/src/xml.cc
index 35c4fe1274de2ef8e8f0e0701d6a9091f2d9b805..7a2bee2e0385fc4e03e536e42deffc67285b12a5 100644
(file)
--- a/
src/xml.cc
+++ b/
src/xml.cc
@@
-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 ();