summaryrefslogtreecommitdiff
path: root/src/picture_frame.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-02-10 21:32:30 +0000
committerCarl Hetherington <cth@carlh.net>2013-02-10 21:32:30 +0000
commit4a557a8b6631f132e851b1bb362cde4270ca6057 (patch)
tree90fb18368ab64a3739d1b1e849838f57045b9fbe /src/picture_frame.cc
parent53fb1df6ca3848f9835b745b8ce13b0ad2196137 (diff)
Derive exceptions from boost::exception and use boost::throw_exception to enable thread-safe exception handling by callers.
Diffstat (limited to 'src/picture_frame.cc')
-rw-r--r--src/picture_frame.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/picture_frame.cc b/src/picture_frame.cc
index 907f70ab..5898d0ea 100644
--- a/src/picture_frame.cc
+++ b/src/picture_frame.cc
@@ -38,14 +38,14 @@ MonoPictureFrame::MonoPictureFrame (string mxf_path, int n)
{
ASDCP::JP2K::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::JP2K::FrameBuffer (4 * Kumu::Megabyte);
if (ASDCP_FAILURE (reader.ReadFrame (n, *_buffer))) {
- throw DCPReadError ("could not read video frame");
+ boost::throw_exception (DCPReadError ("could not read video frame"));
}
}
@@ -93,14 +93,14 @@ StereoPictureFrame::StereoPictureFrame (string mxf_path, int n)
{
ASDCP::JP2K::MXFSReader 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::JP2K::SFrameBuffer (4 * Kumu::Megabyte);
if (ASDCP_FAILURE (reader.ReadFrame (n, *_buffer))) {
- throw DCPReadError ("could not read video frame");
+ boost::throw_exception (DCPReadError ("could not read video frame"));
}
}