diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-13 22:55:53 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-14 00:39:30 +0200 |
| commit | 314060f975dc9806f49ec8bbb1c11041a2ac111f (patch) | |
| tree | 0cf18abccf70e293165cc6251b041edab48fdf50 /src/j2k.cc | |
| parent | a840258cea5829b5d0935c588c98bcc0f204afd8 (diff) | |
Add a special exception for the case when opj_start_compress fails.
Diffstat (limited to 'src/j2k.cc')
| -rw-r--r-- | src/j2k.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -310,9 +310,9 @@ dcp::compress_j2k (shared_ptr<const OpenJPEGImage> xyz, int bandwidth, int frame if (!opj_start_compress (encoder, xyz->opj_image(), stream)) { if ((errno & 0x61500) == 0x61500) { /* We've had one of the magic error codes from our patched openjpeg */ - throw MiscError (String::compose ("could not start JPEG2000 encoding (%1)", errno & 0xff)); + boost::throw_exception (StartCompressionError (errno & 0xff)); } else { - throw MiscError ("could not start JPEG2000 encoding"); + boost::throw_exception (StartCompressionError ()); } } |
