More detailed error message.
authorCarl Hetherington <cth@carlh.net>
Wed, 24 May 2023 21:46:57 +0000 (23:46 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 24 May 2023 21:46:57 +0000 (23:46 +0200)
src/asset_factory.cc

index 833d3d2befe1d28bab917114de965df29391ee19..2ab798997799eda72a5afc90c87ebab906e1f4a6 100644 (file)
@@ -61,8 +61,9 @@ dcp::asset_factory (boost::filesystem::path path, bool ignore_incorrect_picture_
        */
 
        ASDCP::EssenceType_t type;
-       if (ASDCP::EssenceType (path.string().c_str(), type) != ASDCP::RESULT_OK) {
-               throw ReadError("Could not find essence type", path.string());
+       auto const result = ASDCP::EssenceType(path.string().c_str(), type);
+       if (result != ASDCP::RESULT_OK) {
+               throw ReadError(String::compose("Could not find essence type (%1)", result.Message()), path.string());
        }
        switch (type) {
        case ASDCP::ESS_UNKNOWN: