Be more careful about allowing possibly-trouble-causing characters in DCP filenames.
[dcpomatic.git] / src / lib / exceptions.h
index 31c3f5389fe1685198eceff39ef41f4974c9e504..98727e0cc33c5deb4be8cfd70ed2f938ba37fcec 100644 (file)
@@ -95,21 +95,13 @@ public:
 class OpenFileError : public FileError
 {
 public:
-       /** @param f File that we were trying to open */
-       OpenFileError (boost::filesystem::path f);
-};
-
-/** @class CreateFileError.
- *  @brief Indicates that some error occurred when trying to create a file.
- */
-class CreateFileError : public FileError
-{
-public:
-       /** @param f File that we were trying to create */
-       CreateFileError (boost::filesystem::path f);
+       /** @param f File that we were trying to open.
+        *  @param error Code of error that occurred.
+        *  @param reading true if we were opening to read, false if opening to write.
+        */
+       OpenFileError (boost::filesystem::path f, int error, bool reading);
 };
 
-
 /** @class ReadFileError.
  *  @brief Indicates that some error occurred when trying to read from a file
  */
@@ -249,4 +241,12 @@ public:
        {}
 };
 
+class OldFormatError : public std::runtime_error
+{
+public:
+       OldFormatError (std::string s)
+               : std::runtime_error (s)
+       {}
+};
+
 #endif