X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fglsl_error.h;fp=source%2Fglsl%2Fglsl_error.h;h=63c49bbd9112d95f521369d43577603958e17589;hb=47286086863b6009192ffdb3d3471c83211ee943;hp=0000000000000000000000000000000000000000;hpb=c1b0303f65ee966a973197cbdbf177c571478674;p=libs%2Fgl.git diff --git a/source/glsl/glsl_error.h b/source/glsl/glsl_error.h new file mode 100644 index 00000000..63c49bbd --- /dev/null +++ b/source/glsl/glsl_error.h @@ -0,0 +1,37 @@ +#ifndef MSP_GL_SL_ERROR_H_ +#define MSP_GL_SL_ERROR_H_ + +#include +#include + +namespace Msp { +namespace GL { +namespace SL { + +struct Location; + +class invalid_shader_source: public std::runtime_error +{ +public: + invalid_shader_source(const Location &, const std::string &); +#if __cplusplus>=201103L + template + invalid_shader_source(const Location &loc, const std::string & fmt, Args... args): + invalid_shader_source(loc, format(fmt, args...)) + { } +#endif + virtual ~invalid_shader_source() throw() { } +}; + +class parse_error: public invalid_shader_source +{ +public: + parse_error(const Location &, const std::string &, const std::string &); + virtual ~parse_error() throw() { } +}; + +} // namespace SL +} // namespace GL +} // namespace Msp + +#endif