diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-02-10 21:32:30 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-02-10 21:32:30 +0000 |
| commit | 4a557a8b6631f132e851b1bb362cde4270ca6057 (patch) | |
| tree | 90fb18368ab64a3739d1b1e849838f57045b9fbe /src/sound_frame.cc | |
| parent | 53fb1df6ca3848f9835b745b8ce13b0ad2196137 (diff) | |
Derive exceptions from boost::exception and use boost::throw_exception to enable thread-safe exception handling by callers.
Diffstat (limited to 'src/sound_frame.cc')
| -rw-r--r-- | src/sound_frame.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sound_frame.cc b/src/sound_frame.cc index ed626f5e..c2a10564 100644 --- a/src/sound_frame.cc +++ b/src/sound_frame.cc @@ -29,14 +29,14 @@ SoundFrame::SoundFrame (string mxf_path, int n) { ASDCP::PCM::MXFReader reader; if (ASDCP_FAILURE (reader.OpenRead (mxf_path.c_str()))) { - throw FileError ("could not open MXF file for reading", mxf_path); + boost::throw_exception (FileError ("could not open MXF file for reading", mxf_path)); } /* XXX: unfortunate guesswork on this buffer size */ _buffer = new ASDCP::PCM::FrameBuffer (1 * Kumu::Megabyte); if (ASDCP_FAILURE (reader.ReadFrame (n, *_buffer))) { - throw DCPReadError ("could not read audio frame"); + boost::throw_exception (DCPReadError ("could not read audio frame")); } } |
