Better error.
authorCarl Hetherington <cth@carlh.net>
Thu, 8 Sep 2016 13:16:17 +0000 (14:16 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 8 Sep 2016 13:16:17 +0000 (14:16 +0100)
src/mono_picture_frame.cc

index 79527280afd2def374d2d7b78e245e6906713da4..23deb1e8ad3889e1c6411e50cd0e370ec6055ea1 100644 (file)
@@ -79,8 +79,10 @@ MonoPictureFrame::MonoPictureFrame (ASDCP::JP2K::MXFReader* reader, int n, share
        /* XXX: unfortunate guesswork on this buffer size */
        _buffer = new ASDCP::JP2K::FrameBuffer (4 * Kumu::Megabyte);
 
-       if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c->decryption()))) {
-               boost::throw_exception (DCPReadError (String::compose ("could not read video frame %1", n)));
+       ASDCP::Result_t const r = reader->ReadFrame (n, *_buffer, c->decryption());
+
+       if (ASDCP_FAILURE (r)) {
+               boost::throw_exception (DCPReadError (String::compose ("could not read video frame %1 (%2)", n, static_cast<int>(r))));
        }
 }