Fix font_id_map errors when importing DCP subtitles that have no
[dcpomatic.git] / src / lib / exceptions.cc
index 7e98a2b57c4fd95c4ec5cd038a0f4f9bc9869851..66db9fda71d0b13414515a697b8a8acced87810b 100644 (file)
@@ -116,8 +116,8 @@ KDMAsContentError::KDMAsContentError ()
 }
 
 
-NetworkError::NetworkError (string s, string d)
-       : runtime_error (String::compose("%1 (%2)", s, d))
+NetworkError::NetworkError (string s, optional<string> d)
+       : runtime_error (String::compose("%1%2", s, d ? String::compose(" (%1)", *d) : ""))
        , _summary (s)
        , _detail (d)
 {