]> git.tdb.fi Git - libs/gl.git/blobdiff - source/error.h
Allow setting uniform values using a Uniform object
[libs/gl.git] / source / error.h
index 8ead50d83f65b407eac16d5a4ece80e547de9566..bb714506ccf908ced9aea4f057fa78dbfdd4370e 100644 (file)
@@ -1,16 +1,44 @@
 #ifndef MSP_GL_ERROR_H_
 #define MSP_GL_ERROR_H_
 
-#include <msp/core/error.h>
+#include <stdexcept>
 
 namespace Msp {
 namespace GL {
 
-class InvalidOperation: public Exception
+class unsupported_extension: public std::runtime_error
 {
 public:
-       InvalidOperation(const std::string &w_): Exception(w_) { }
-       ~InvalidOperation() throw() { }
+       unsupported_extension(const std::string &w): std::runtime_error(w) { }
+       virtual ~unsupported_extension() throw() { }
+};
+
+class invalid_operation: public std::logic_error
+{
+public:
+       invalid_operation(const std::string &w): std::logic_error(w) { }
+       virtual ~invalid_operation() throw() { }
+};
+
+class stack_underflow: public std::logic_error
+{
+public:
+       stack_underflow(const std::string &w): std::logic_error(w) { }
+       virtual ~stack_underflow() throw() { }
+};
+
+class incompatible_data: public std::logic_error
+{
+public:
+       incompatible_data(const std::string &w): std::logic_error(w) { }
+       virtual ~incompatible_data() throw() { }
+};
+
+class compile_error: public std::runtime_error
+{
+public:
+       compile_error(const std::string &w): std::runtime_error(w) { }
+       virtual ~compile_error() throw() { }
 };
 
 } // namespace GL