From fe9bbdf3f5223ee94cb51ba00ddab7f4a6ddb754 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 3 May 2014 15:05:33 +0100 Subject: Use exceptions to hold errors even in the keep_going case. --- src/exceptions.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/exceptions.h') 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 */ -- cgit v1.2.3