summaryrefslogtreecommitdiff
path: root/src/lib/exceptions.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-07 19:35:42 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-07 19:35:42 +0100
commit5c9e39df078aab9f03ae186d0758d4d710f90bab (patch)
tree24ba2ec0e0d1e0f55411efed26396ad93f6879a0 /src/lib/exceptions.h
parent173fc4c4ca837cbea881efc361604b82806a1807 (diff)
Give better errors when incorrect KDMs are used (#1326).
Diffstat (limited to 'src/lib/exceptions.h')
-rw-r--r--src/lib/exceptions.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h
index 5efb045b7..7220af35f 100644
--- a/src/lib/exceptions.h
+++ b/src/lib/exceptions.h
@@ -192,9 +192,19 @@ public:
class KDMError : public std::runtime_error
{
public:
- explicit KDMError (std::string s)
- : std::runtime_error (s)
- {}
+ KDMError (std::string s, std::string d);
+
+ std::string summary () const {
+ return _summary;
+ }
+
+ std::string detail () const {
+ return _detail;
+ }
+
+private:
+ std::string _summary;
+ std::string _detail;
};
/** @class PixelFormatError