sdlterm/src/sdlterm.h
changeset 58 50308ed5e4f9
parent 57 911927edbdde
child 60 fccca2a60492
--- a/sdlterm/src/sdlterm.h	Tue Jan 08 01:12:07 2013 +0100
+++ b/sdlterm/src/sdlterm.h	Tue Jan 08 23:36:01 2013 +0100
@@ -2,7 +2,9 @@
 #include "SDL_ttf.h"
 
 #include <map>
+#include <string>
 #include <vector>
+#include <exception>
 
 
 namespace Style
@@ -223,3 +225,17 @@
     static Uint32 _wait_event_callback(Uint32 interval, void *param);
 };
 
+
+class SDLTermError: public std::exception
+{
+public:
+    SDLTermError(const std::string &a_msg)
+        : std::exception(), _msg(a_msg) {};
+    virtual ~SDLTermError() throw() {};
+
+    virtual const char *what() const throw() { return _msg.c_str(); };
+
+private:
+    std::string _msg;
+};
+