Merge branch '2.0' of git.carlh.net:git/dcpomatic into 2.0
[dcpomatic.git] / src / lib / exceptions.h
index 05c66df3a66e57bc2ed3c236b1f6e637bdfd81ee..96dc816ec4dea27cbbc94937dbf98a0c76c2fe6b 100644 (file)
@@ -40,9 +40,9 @@ class StringError : public std::exception
 {
 public:
        /** @param w Error message */
-       StringError (std::string w) {
-               _what = w;
-       }
+       StringError (std::string w)
+               : _what (w)
+       {}
 
        virtual ~StringError () throw () {}
 
@@ -259,6 +259,12 @@ public:
        InvalidSignerError ();
 };
 
+class ProgrammingError : public StringError
+{
+public:
+       ProgrammingError (std::string file, int line);
+};
+
 /** @class ExceptionStore
  *  @brief A parent class for classes which have a need to catch and
  *  re-throw exceptions.