summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-10-26 23:24:27 +0100
committerCarl Hetherington <cth@carlh.net>2013-10-26 23:24:27 +0100
commit85fffccfceaef5652452eb60bef98b0c49a898c6 (patch)
tree5e88f70b78f0ad9a097f2d6ca776f791c4743ef7 /src
parentfece2ebfd071f5e63377e7ff2ced08124e076397 (diff)
Better error message.
Diffstat (limited to 'src')
-rw-r--r--src/mono_picture_asset_writer.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mono_picture_asset_writer.cc b/src/mono_picture_asset_writer.cc
index 1f384c28..ccbc8e87 100644
--- a/src/mono_picture_asset_writer.cc
+++ b/src/mono_picture_asset_writer.cc
@@ -29,6 +29,7 @@ using std::istream;
using std::ostream;
using std::string;
using boost::shared_ptr;
+using boost::lexical_cast;
using namespace libdcp;
struct MonoPictureAssetWriter::ASDCPState : public ASDCPStateBase
@@ -68,8 +69,9 @@ MonoPictureAssetWriter::write (uint8_t* data, int size)
uint64_t const before_offset = _state->mxf_writer.Tell ();
string hash;
- if (ASDCP_FAILURE (_state->mxf_writer.WriteFrame (_state->frame_buffer, _state->encryption_context, 0, &hash))) {
- boost::throw_exception (MXFFileError ("error in writing video MXF", _asset->path().string()));
+ ASDCP::Result_t const r = _state->mxf_writer.WriteFrame (_state->frame_buffer, _state->encryption_context, 0, &hash);
+ if (ASDCP_FAILURE (r)) {
+ boost::throw_exception (MXFFileError ("error in writing video MXF (" + lexical_cast<string> (int(r)) + ")", _asset->path().string()));
}
++_frames_written;