Give a better error when opening a DCP with File -> Open by mistake (#1723).
[dcpomatic.git] / src / lib / exceptions.cc
index bf474e3ead2067ef5e6d1319b8a6ca5a2f27d827..4b518e73a5157aeb2eec10487498c68d7c310744 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)
 {