summaryrefslogtreecommitdiff
path: root/src/j2k.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-13 22:55:53 +0200
committerCarl Hetherington <cth@carlh.net>2020-04-14 00:39:30 +0200
commit314060f975dc9806f49ec8bbb1c11041a2ac111f (patch)
tree0cf18abccf70e293165cc6251b041edab48fdf50 /src/j2k.cc
parenta840258cea5829b5d0935c588c98bcc0f204afd8 (diff)
Add a special exception for the case when opj_start_compress fails.
Diffstat (limited to 'src/j2k.cc')
-rw-r--r--src/j2k.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/j2k.cc b/src/j2k.cc
index f1e4c3f5..a81da68c 100644
--- a/src/j2k.cc
+++ b/src/j2k.cc
@@ -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 ());
}
}