X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FMoof%2FVideo.hh;h=d640ad2386ce7a4fefa4bdda725fb35485302297;hb=892da43bf5796e7c5f593a6d0f53bd797a36bd3e;hp=4be691dcf62ec0af20c06abf9bab6cdd58ff4ee0;hpb=fdfba4553433b9b2804c2772c7645211b828c2ea;p=chaz%2Fyoink diff --git a/src/Moof/Video.hh b/src/Moof/Video.hh index 4be691d..d640ad2 100644 --- a/src/Moof/Video.hh +++ b/src/Moof/Video.hh @@ -35,6 +35,8 @@ #include +#include + namespace Mf { @@ -88,8 +90,7 @@ private: public: - inline static VideoP alloc(const std::string& caption, - const std::string& icon) + static VideoP alloc(const std::string& caption, const std::string& icon) { return VideoP(new Video(caption, icon)); } @@ -128,10 +129,15 @@ public: void swap(); - struct Exception : public std::runtime_error + struct Exception : public Mf::Exception { - explicit Exception(const std::string& what_arg) : - std::runtime_error(what_arg) {} + explicit Exception(unsigned error) : + Mf::Exception(error) {} + + void raise() + { + throw *this; + } }; };