summaryrefslogtreecommitdiff
path: root/src/exceptions.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/exceptions.cc
parenta840258cea5829b5d0935c588c98bcc0f204afd8 (diff)
Add a special exception for the case when opj_start_compress fails.
Diffstat (limited to 'src/exceptions.cc')
-rw-r--r--src/exceptions.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/exceptions.cc b/src/exceptions.cc
index a49c7004..7f389f31 100644
--- a/src/exceptions.cc
+++ b/src/exceptions.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2020 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -40,6 +40,7 @@
using std::string;
using std::runtime_error;
+using boost::optional;
using namespace dcp;
FileError::FileError (string message, boost::filesystem::path filename, int number)
@@ -123,3 +124,10 @@ BadKDMDateError::BadKDMDateError (bool starts_too_early)
{
}
+
+
+StartCompressionError::StartCompressionError (optional<int> code)
+ : runtime_error (String::compose("Could not start JPEG2000 encoding%1", code ? String::compose(" (%1", *code) : ""))
+ , _code (code)
+{}
+