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.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/exceptions.h') diff --git a/src/exceptions.h b/src/exceptions.h index ccf7a081..770bd916 100644 --- a/src/exceptions.h +++ b/src/exceptions.h @@ -211,6 +211,20 @@ private: bool _starts_too_early; }; + +class StartCompressionError : public std::runtime_error +{ +public: + explicit StartCompressionError (boost::optional code = boost::optional()); + + boost::optional code () const { + return _code; + } + +private: + boost::optional _code; +}; + } #endif -- cgit v1.2.3