]> git.tdb.fi Git - libs/gl.git/blobdiff - source/except.h
Add support for detecting extensions
[libs/gl.git] / source / except.h
diff --git a/source/except.h b/source/except.h
new file mode 100644 (file)
index 0000000..4ba6f71
--- /dev/null
@@ -0,0 +1,33 @@
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_GL_EXCEPT_H_
+#define MSP_GL_EXCEPT_H_
+
+#include <msp/core/except.h>
+
+namespace Msp {
+namespace GL {
+
+class InvalidOperation: public Exception
+{
+public:
+       InvalidOperation(const std::string &w_): Exception(w_) { }
+       ~InvalidOperation() throw() { }
+};
+
+class UnsupportedExtension: public Exception
+{
+public:
+       UnsupportedExtension(const std::string &w_): Exception(w_+" is not supported") { }
+       ~UnsupportedExtension() throw() { }
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif