Cleanup: move stride_round_up into the only place it is used.
[dcpomatic.git] / src / lib / exceptions.h
index 9b7837a46bef89c695f0be7097a254566b8d8939..2cae86accbbe4f823272a010544fb6cba5492051 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, boost::optional<std::string> d = boost::optional<std::string>());
+
+       std::string summary () const {
+               return _summary;
+       }
+
+       boost::optional<std::string> detail () const {
+               return _detail;
+       }
+
+private:
+       std::string _summary;
+       boost::optional<std::string> _detail;
 };