[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:42:11 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=4e1a789

The following commit has been merged in the master branch:
commit 4e1a789f78f92b56ee5edc155e8123eb5ed58232
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Tue Jan 4 12:43:31 2011 +0000

    #750: Replaced assert with exception.
---
 src/error.cpp | 3 ++-
 src/xmp.cpp   | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/error.cpp b/src/error.cpp
index faac04a..c07626d 100644
--- a/src/error.cpp
+++ b/src/error.cpp
@@ -104,7 +104,8 @@ namespace {
         { 48, N_("Invalid XmpText type `%1'") }, // %1=type
         { 49, N_("TIFF directory %1 has too many entries") }, // %1=TIFF directory name
         { 50, N_("Multiple TIFF array element tags %1 in one directory") }, // %1=tag number
-        { 51, N_("TIFF array element tag %1 has wrong type") } // %1=tag number
+        { 51, N_("TIFF array element tag %1 has wrong type") }, // %1=tag number
+        { 52, N_("%1 has invalid XMP value type `%2'") } // %1=key, %2=value type
     };
 
 }
diff --git a/src/xmp.cpp b/src/xmp.cpp
index 3fdbb03..9fef721 100644
--- a/src/xmp.cpp
+++ b/src/xmp.cpp
@@ -651,7 +651,7 @@ namespace Exiv2 {
             }
             // Todo: Xmpdatum should have an XmpValue, not a Value
             const XmpValue* val = dynamic_cast<const XmpValue*>(&i->value());
-            assert(val);
+            if (val == 0) throw Error(52, i->key(), i->typeName());
             options =   xmpArrayOptionBits(val->xmpArrayType())
                       | xmpArrayOptionBits(val->xmpStruct());
             if (   i->typeId() == xmpBag
@@ -686,7 +686,7 @@ namespace Exiv2 {
                 continue;
             }
             // Don't let any Xmpdatum go by unnoticed
-            throw Error(38, i->tagName(), TypeInfo::typeName(i->typeId()));
+            throw Error(38, i->tagName(), i->typeName());
         }
         std::string tmpPacket;
         meta.SerializeToBuffer(&tmpPacket, xmpFormatOptionBits(static_cast<XmpFormatFlags>(formatFlags)), padding); // throws

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list