{}
DecodeError (std::string function, std::string caller)
- : std::runtime_error (String::compose("%1 failed [%2", function, caller))
+ : std::runtime_error (String::compose("%1 failed [%2]", function, caller))
{}
DecodeError (std::string function, std::string caller, int error)
: std::runtime_error (String::compose("%1 failed [%2] (%3)", function, caller, error))
{}
+
+ DecodeError (std::string function, std::string caller, boost::filesystem::path file)
+ : std::runtime_error (String::compose("%1 failed [%2] (%3)", function, caller, file.string()))
+ {}
+
+ DecodeError (std::string function, std::string caller, int error, boost::filesystem::path file)
+ : std::runtime_error (String::compose("%1 failed [%2] (%3) (%4)", function, caller, error, file.string()))
+ {}
};
class NetworkError : public std::runtime_error
{
public:
- explicit NetworkError (std::string s)
- : std::runtime_error (s)
- {}
+ explicit NetworkError (std::string s, boost::optional<std::string> d = boost::optional<std::string>());
+
+ std::string summary () const {
+ return _summary;
+ }
+
+ boost::optional<std::string> detail () const {
+ return _detail;
+ }
+
+private:
+ std::string _summary;
+ boost::optional<std::string> _detail;
};
class GLError : public std::runtime_error
{
public:
- GLError (char const * last, int e);
+ GLError (char const* last, int e);
+ GLError (char const* message);
};
/** @class CommunicationFailedError
- * @brief Communcation between dcpomatic2_disk and _disk_writer failed somehow.
+ * @brief Communication between dcpomatic2_disk and _disk_writer failed somehow.
*/
class CommunicationFailedError : public CopyError
{