From 265975201012fc0fb83b8cf100e02f4b24cff8ae Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 8 Sep 2016 14:16:17 +0100 Subject: Better error. --- src/mono_picture_frame.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mono_picture_frame.cc b/src/mono_picture_frame.cc index 79527280..23deb1e8 100644 --- a/src/mono_picture_frame.cc +++ b/src/mono_picture_frame.cc @@ -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(r)))); } } -- cgit v1.2.3