diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-13 22:55:53 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-14 00:39:30 +0200 |
| commit | 314060f975dc9806f49ec8bbb1c11041a2ac111f (patch) | |
| tree | 0cf18abccf70e293165cc6251b041edab48fdf50 /src/exceptions.h | |
| parent | a840258cea5829b5d0935c588c98bcc0f204afd8 (diff) | |
Add a special exception for the case when opj_start_compress fails.
Diffstat (limited to 'src/exceptions.h')
| -rw-r--r-- | src/exceptions.h | 14 |
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 |
