Skip to content

Is that intended that Xmpdatum::tagLabel() might throw an exception but print() won't? #2526

Answered by clanmills
BLumia asked this question in Q&A
Discussion options

You must be logged in to vote

Lots of good questions here. I'll try my best to answer using a modified samples/xmpdump.cpp to which I've added a few lines of code as follows:

594 rmills@rmillsm1:~/gnu/github/exiv2/0.27-maintenance/build $ git diff ../samples/xmpdump.cpp 
diff --git a/samples/xmpdump.cpp b/samples/xmpdump.cpp
index 97803922c..9e2c1849b 100644
--- a/samples/xmpdump.cpp
+++ b/samples/xmpdump.cpp
@@ -51,6 +51,16 @@ int main(int argc, char* const argv[])
         }
         std::cout << xmpPacket << "\n";
 
+        Exiv2::XmpData &xmpData = image->xmpData();
+        Exiv2::XmpData::const_iterator end = xmpData.end();
+        for (Exiv2::XmpData::const_iterator i = xmpData.begin(); i != end; ++i) {
+    …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@BLumia
Comment options

@clanmills
Comment options

Answer selected by BLumia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants