Switch encoding to ffmpeg send/receive API.
[dcpomatic.git] / src / lib / exceptions.h
index 8bce0c8abac7137a9ea3f62bdb396dfa774be696..5b7baf0e50fdc98d75f13608f4f558131601def3 100644 (file)
@@ -46,11 +46,11 @@ public:
        {}
 
        explicit DecodeError (std::string function, std::string caller)
-               : std::runtime_error (String::compose("%1 failed in %2", function, caller))
+               : std::runtime_error (String::compose("%1 failed [%2", function, caller))
        {}
 
        explicit DecodeError (std::string function, std::string caller, int error)
-               : std::runtime_error (String::compose("%1 failed in %2 (%3)", function, caller, error))
+               : std::runtime_error (String::compose("%1 failed [%2] (%3)", function, caller, error))
        {}
 };
 
@@ -62,6 +62,7 @@ public:
        {}
 };
 
+
 /** @class EncodeError
  *  @brief A low-level problem with an encoder.
  */
@@ -71,8 +72,17 @@ public:
        explicit EncodeError (std::string s)
                : std::runtime_error (s)
        {}
+
+       explicit EncodeError (std::string function, std::string caller)
+               : std::runtime_error (String::compose("%1 failed [%2]", function, caller))
+       {}
+
+       explicit EncodeError (std::string function, std::string caller, int error)
+               : std::runtime_error (String::compose("%1 failed [%2] (%3)", function, caller, error))
+       {}
 };
 
+
 /** @class FileError.
  *  @brief Parent class for file-related errors.
  */