From 314060f975dc9806f49ec8bbb1c11041a2ac111f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 13 Apr 2020 22:55:53 +0200 Subject: Add a special exception for the case when opj_start_compress fails. --- src/exceptions.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/exceptions.cc') 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 + Copyright (C) 2014-2020 Carl Hetherington 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 code) + : runtime_error (String::compose("Could not start JPEG2000 encoding%1", code ? String::compose(" (%1", *code) : "")) + , _code (code) +{} + -- cgit v1.2.3