X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fexceptions.h;h=5efb045b74906cdbb77e782d61023ba709c6c77d;hb=c6871fe8617b3de03662b7630355059393bf8043;hp=98727e0cc33c5deb4be8cfd70ed2f938ba37fcec;hpb=54038beb4437c027e584fc95110f6fd4dbf2207d;p=dcpomatic.git diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h index 98727e0cc..5efb045b7 100644 --- a/src/lib/exceptions.h +++ b/src/lib/exceptions.h @@ -39,7 +39,7 @@ extern "C" { class DecodeError : public std::runtime_error { public: - DecodeError (std::string s) + explicit DecodeError (std::string s) : std::runtime_error (s) {} }; @@ -50,7 +50,7 @@ public: class EncodeError : public std::runtime_error { public: - EncodeError (std::string s) + explicit EncodeError (std::string s) : std::runtime_error (s) {} }; @@ -84,7 +84,7 @@ private: class JoinError : public std::runtime_error { public: - JoinError (std::string s) + explicit JoinError (std::string s) : std::runtime_error (s) {} }; @@ -158,7 +158,7 @@ class MissingSettingError : public SettingError { public: /** @param s Name of setting that was required */ - MissingSettingError (std::string s); + explicit MissingSettingError (std::string s); }; /** @class BadSettingError @@ -167,7 +167,9 @@ public: class BadSettingError : public SettingError { public: - /** @param s Name of setting that is bad */ + /** @param s Name of setting that is bad. + * @param m Error message. + */ BadSettingError (std::string s, std::string m) : SettingError (s, m) {} @@ -179,7 +181,7 @@ public: class NetworkError : public std::runtime_error { public: - NetworkError (std::string s) + explicit NetworkError (std::string s) : std::runtime_error (s) {} }; @@ -190,7 +192,7 @@ public: class KDMError : public std::runtime_error { public: - KDMError (std::string s) + explicit KDMError (std::string s) : std::runtime_error (s) {} }; @@ -216,7 +218,7 @@ public: class DCPError : public std::runtime_error { public: - DCPError (std::string s) + explicit DCPError (std::string s) : std::runtime_error (s) {} }; @@ -225,18 +227,19 @@ class InvalidSignerError : public std::runtime_error { public: InvalidSignerError (); + explicit InvalidSignerError (std::string reason); }; class ProgrammingError : public std::runtime_error { public: - ProgrammingError (std::string file, int line); + ProgrammingError (std::string file, int line, std::string message = ""); }; class TextEncodingError : public std::runtime_error { public: - TextEncodingError (std::string s) + explicit TextEncodingError (std::string s) : std::runtime_error (s) {} }; @@ -244,9 +247,15 @@ public: class OldFormatError : public std::runtime_error { public: - OldFormatError (std::string s) + explicit OldFormatError (std::string s) : std::runtime_error (s) {} }; +class KDMAsContentError : public std::runtime_error +{ +public: + KDMAsContentError (); +}; + #endif