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/util.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/util.cc')
| -rw-r--r-- | src/util.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.cc b/src/util.cc index 1cbec719..b1556e33 100644 --- a/src/util.cc +++ b/src/util.cc @@ -66,7 +66,7 @@ libdcp::make_digest (string filename) { Kumu::FileReader reader; if (ASDCP_FAILURE (reader.OpenRead (filename.c_str ()))) { - throw FileError ("could not open file to compute digest", filename); + boost::throw_exception (FileError ("could not open file to compute digest", filename)); } SHA_CTX sha; @@ -81,7 +81,7 @@ libdcp::make_digest (string filename) if (r == Kumu::RESULT_ENDOFFILE) { break; } else if (ASDCP_FAILURE (r)) { - throw FileError ("could not read file to compute digest", filename); + boost::throw_exception (FileError ("could not read file to compute digest", filename)); } SHA1_Update (&sha, read_buffer.Data(), read); @@ -187,7 +187,7 @@ libdcp::decompress_j2k (uint8_t* data, int64_t size, int reduce) if (!image) { opj_destroy_decompress (decoder); opj_cio_close (cio); - throw DCPReadError ("could not decode JPEG2000 codestream"); + boost::throw_exception (DCPReadError ("could not decode JPEG2000 codestream")); } opj_cio_close (cio); |
