summaryrefslogtreecommitdiff
path: root/src/exceptions.h
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.h
parenta840258cea5829b5d0935c588c98bcc0f204afd8 (diff)
Add a special exception for the case when opj_start_compress fails.
Diffstat (limited to 'src/exceptions.h')
-rw-r--r--src/exceptions.h14
1 files changed, 14 insertions, 0 deletions
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<int> code = boost::optional<int>());
+
+ boost::optional<int> code () const {
+ return _code;
+ }
+
+private:
+ boost::optional<int> _code;
+};
+
}
#endif