Another better error message.
authorCarl Hetherington <cth@carlh.net>
Mon, 28 Oct 2013 21:27:03 +0000 (21:27 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 28 Oct 2013 21:27:03 +0000 (21:27 +0000)
src/sound_asset.cc

index 70ed0f29cfb279e0a6daff9dc0326affdeac8728..85c6775f8d894f5bdbbad90c80deb184f71231d7 100644 (file)
@@ -347,8 +347,9 @@ SoundAssetWriter::write (float const * const * data, int frames)
 void
 SoundAssetWriter::write_current_frame ()
 {
-       if (ASDCP_FAILURE (_state->mxf_writer.WriteFrame (_state->frame_buffer, _state->encryption_context, 0))) {
-               boost::throw_exception (MiscError ("could not write audio MXF frame"));
+       ASDCP::Result_t const r = _state->mxf_writer.WriteFrame (_state->frame_buffer, _state->encryption_context, 0);
+       if (ASDCP_FAILURE (r)) {
+               boost::throw_exception (MiscError ("could not write audio MXF frame (" + lexical_cast<string> (int (r)) + ")"));
        }
 
        ++_frames_written;