X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEngine.hh;h=f088dc56e85fcb663766594a2c9b454788e7c519;hp=aa751356f6a81b6ec1712cf1ee7bdf322384d749;hb=5fa5f117f28922a7e539a432367960c1a61f837d;hpb=a5f0d391406a68275b41448fc3f49e8d8396c497 diff --git a/src/Moof/Engine.hh b/src/Moof/Engine.hh index aa75135..f088dc5 100644 --- a/src/Moof/Engine.hh +++ b/src/Moof/Engine.hh @@ -35,6 +35,7 @@ #include #include +#include #include @@ -71,10 +72,15 @@ public: virtual void draw(Scalar alpha); virtual void handleEvent(const Event& event); - struct Exception : 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; + } }; private: