Missing FFmpeg include; fixes #989.
[dcpomatic.git] / src / lib / exceptions.cc
index b8144d2edb3bb338f68f4b5a2f349e642d710bb7..cef6e7447f765ad8430b89783e632b7217ca1472 100644 (file)
@@ -27,15 +27,14 @@ using std::string;
 using std::runtime_error;
 
 /** @param f File that we were trying to open */
-OpenFileError::OpenFileError (boost::filesystem::path f)
-       : FileError (String::compose (_("could not open file %1"), f.string()), f)
-{
-
-}
-
-/** @param f File that we were trying to create */
-CreateFileError::CreateFileError (boost::filesystem::path f)
-       : FileError (String::compose (_("could not create file %1"), f.string()), f)
+OpenFileError::OpenFileError (boost::filesystem::path f, int error, bool reading)
+       : FileError (
+               String::compose (
+                       reading ? _("could not open file %1 for reading (%2)") : _("could not open file %1 for writing (%2)"),
+                       f.string(),
+                       error),
+               f
+               )
 {
 
 }
@@ -59,7 +58,7 @@ MissingSettingError::MissingSettingError (string s)
 }
 
 PixelFormatError::PixelFormatError (string o, AVPixelFormat f)
-       : runtime_error (String::compose (_("Cannot handle pixel format %1 during %2"), f, o))
+       : runtime_error (String::compose (_("Cannot handle pixel format %1 during %2"), (int) f, o))
 {
 
 }