Give a better error when opening a DCP with File -> Open by mistake (#1723).
[dcpomatic.git] / src / lib / exceptions.cc
index 99d4c3979a602dc5e1a84c0673e29c10c1e9d4e5..ba3d4a05cd68bacbefd4d446fa4e2b3fbfaa87c0 100644 (file)
@@ -40,6 +40,13 @@ OpenFileError::OpenFileError (boost::filesystem::path f, int error, Mode mode)
 
 }
 
+FileNotFoundError::FileNotFoundError (boost::filesystem::path f)
+       : runtime_error(String::compose("File %1 not found", f.string()))
+       , _file (f)
+{
+
+}
+
 ReadFileError::ReadFileError (boost::filesystem::path f, int e)
        : FileError (String::compose (_("could not read from file %1 (%2)"), f.string(), strerror (e)), f)
 {