Throw a different exception when an unrecognised LabelSetType is found.
[libdcp.git] / src / exceptions.h
index 2871ee86598f7696373ca452ec2ee26e8c5d9c39..65271c1618fc233af9c3ed18710abef97721e90f 100644 (file)
@@ -99,6 +99,7 @@ class DCPReadError : public std::runtime_error
 public:
        explicit DCPReadError (std::string message)
                : std::runtime_error(message)
+               , _message(message)
        {}
 
        DCPReadError (std::string message, std::string detail);
@@ -133,6 +134,19 @@ public:
 
        MissingAssetError (boost::filesystem::path, AssetType = UNKNOWN);
        ~MissingAssetError () throw () {}
+
+       boost::filesystem::path path () const {
+               return _path;
+       }
+
+private:
+       boost::filesystem::path _path;
+};
+
+class BadContentKindError : public DCPReadError
+{
+public:
+       BadContentKindError (std::string content_kind);
 };
 
 /** @class XMLError
@@ -208,6 +222,12 @@ public:
        CertificateChainError (std::string message);
 };
 
+class MissingSubtitleImageError : public std::runtime_error
+{
+public:
+       MissingSubtitleImageError (std::string id);
+};
+
 }
 
 #endif