]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Engine.hh
better logging (maybe) and exception handling
[chaz/yoink] / src / Moof / Engine.hh
index aa751356f6a81b6ec1712cf1ee7bdf322384d749..f088dc56e85fcb663766594a2c9b454788e7c519 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <Moof/Dispatcher.hh>
 #include <Moof/Event.hh>
+#include <Moof/Exception.hh>
 #include <Moof/Math.hh>
 
 
@@ -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:
This page took 0.017657 seconds and 4 git commands to generate.