Work around deadlock when destroying J2KEncoder with a full writer queue (#2784).
[dcpomatic.git] / src / lib / exceptions.cc
index ebb607b9476b77f7969f81c3d5f78d18e1a0f68e..a51842b80352a663a302af009353ebed556288f3 100644 (file)
@@ -116,6 +116,15 @@ KDMAsContentError::KDMAsContentError ()
 }
 
 
+NetworkError::NetworkError (string s, optional<string> d)
+       : runtime_error (String::compose("%1%2", s, d ? String::compose(" (%1)", *d) : ""))
+       , _summary (s)
+       , _detail (d)
+{
+
+}
+
+
 KDMError::KDMError (string s, string d)
        : runtime_error (String::compose("%1 (%2)", s, d))
        , _summary (s)
@@ -132,10 +141,18 @@ GLError::GLError (char const* last, int e)
 }
 
 
-CopyError::CopyError (string m, optional<int> n)
-       : runtime_error (String::compose("%1%2", m, n ? String::compose(" (%1)", *n) : ""))
+GLError::GLError (char const* message)
+       : runtime_error (message)
+{
+
+}
+
+
+CopyError::CopyError(string m, optional<int> ext4, optional<int> platform)
+       : runtime_error(String::compose("%1%2%3", m, ext4 ? String::compose(" (%1)", *ext4) : "", platform ? String::compose(" (%1)", *platform) : ""))
        , _message (m)
-       , _number (n)
+       , _ext4_number(ext4)
+       , _platform_number(platform)
 {
 
 }