diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-08 10:05:49 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-08 10:05:49 +0000 |
| commit | 83591a4390db550a7d1495b9699c62315e2d7710 (patch) | |
| tree | 29c93f38853ae2d99c7bca8c7b52d2c294881c0e /src/picture_asset_writer_common.cc | |
| parent | 3a148fab61d2b23379589a4f0f256c21950742b8 (diff) | |
Throw better file errors (with numbers).
Diffstat (limited to 'src/picture_asset_writer_common.cc')
| -rw-r--r-- | src/picture_asset_writer_common.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/picture_asset_writer_common.cc b/src/picture_asset_writer_common.cc index 94999131..99f55be0 100644 --- a/src/picture_asset_writer_common.cc +++ b/src/picture_asset_writer_common.cc @@ -44,15 +44,16 @@ void libdcp::start (PictureAssetWriter* writer, shared_ptr<P> state, Q* asset, u asset->fill_writer_info (&state->writer_info, asset->uuid(), writer->_asset->interop(), writer->_asset->metadata()); - if (ASDCP_FAILURE (state->mxf_writer.OpenWrite ( - asset->path().string().c_str(), - state->writer_info, - state->picture_descriptor, - 16384, - writer->_overwrite) - )) { - - boost::throw_exception (MXFFileError ("could not open MXF file for writing", asset->path().string())); + Kumu::Result_t r = state->mxf_writer.OpenWrite ( + asset->path().string().c_str(), + state->writer_info, + state->picture_descriptor, + 16384, + writer->_overwrite + ); + + if (ASDCP_FAILURE (r)) { + boost::throw_exception (MXFFileError ("could not open MXF file for writing", asset->path().string(), r)); } writer->_started = true; |
