summaryrefslogtreecommitdiff
path: root/src/exceptions.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-03 15:05:33 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-03 15:05:33 +0100
commitfe9bbdf3f5223ee94cb51ba00ddab7f4a6ddb754 (patch)
tree1d7ff4b95d3a65989c3cb136ae338e59ca5251b1 /src/exceptions.h
parent9f5a1507380c52338765477da7cbe378b68870d9 (diff)
Use exceptions to hold errors even in the keep_going case.
Diffstat (limited to 'src/exceptions.h')
-rw-r--r--src/exceptions.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/exceptions.h b/src/exceptions.h
index 7446e352..43ddab02 100644
--- a/src/exceptions.h
+++ b/src/exceptions.h
@@ -105,11 +105,31 @@ public:
return _message.c_str ();
}
-private:
+protected:
+ DCPReadError () {}
+
/** error message */
std::string _message;
};
+class MissingAssetError : public DCPReadError
+{
+public:
+ enum AssetType {
+ MAIN_PICTURE,
+ MAIN_SOUND,
+ MAIN_SUBTITLE,
+ UNKNOWN
+ };
+
+ MissingAssetError (boost::filesystem::path, AssetType = UNKNOWN);
+ ~MissingAssetError () throw () {}
+
+private:
+ boost::filesystem::path _path;
+ AssetType _type;
+};
+
/** @class XMLError
* @brief An XML error
*/