X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ferror.h;h=bb714506ccf908ced9aea4f057fa78dbfdd4370e;hp=61799032323d15598e9bdcf5a2ad36712b343819;hb=bfeb6c6404659fffb1222e084b0bd08cccb4e67d;hpb=f098a871fc6dc7b61a5aca5581fa327e4124c036 diff --git a/source/error.h b/source/error.h index 61799032..bb714506 100644 --- a/source/error.h +++ b/source/error.h @@ -1,23 +1,44 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_GL_ERROR_H_ #define MSP_GL_ERROR_H_ -#include +#include namespace Msp { namespace GL { -class InvalidOperation: public Exception +class unsupported_extension: public std::runtime_error +{ +public: + 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: - InvalidOperation(const std::string &w_): Exception(w_) { } - ~InvalidOperation() throw() { } + compile_error(const std::string &w): std::runtime_error(w) { } + virtual ~compile_error() throw() { } }; } // namespace GL