Throw a more appropriate exception.
[dcpomatic.git] / src / lib / exceptions.h
index d0ba1f068ed23e3f62e3387a3f82dd1fa03df1a7..a8f095c22a2fba730ceb941286229424114d7236 100644 (file)
@@ -253,9 +253,19 @@ public:
 class NetworkError : public std::runtime_error
 {
 public:
-       explicit NetworkError (std::string s)
-               : std::runtime_error (s)
-       {}
+       explicit NetworkError (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;
 };
 
 
@@ -378,6 +388,7 @@ class GLError : public std::runtime_error
 {
 public:
        GLError (char const* last, int e);
+       GLError (char const* message);
 };