#750: Replaced assert with exception.
This commit is contained in:
parent
f253dff8d7
commit
4e1a789f78
@ -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
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user