From 658695856029c7ae80e3556d07a1a5cb1b51cf1d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 28 Oct 2013 21:27:03 +0000 Subject: [PATCH] Another better error message. --- src/sound_asset.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sound_asset.cc b/src/sound_asset.cc index 70ed0f29..85c6775f 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -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 (int (r)) + ")")); } ++_frames_written; -- 2.30.2