1 #ifndef MSP_GL_SL_ERROR_H_
2 #define MSP_GL_SL_ERROR_H_
5 #include <msp/strings/format.h>
13 class invalid_shader_source: public std::runtime_error
16 invalid_shader_source(const std::string &w): runtime_error(w) { }
17 invalid_shader_source(const Location &, const std::string &);
18 #if __cplusplus>=201103L
19 template<typename... Args>
20 invalid_shader_source(const Location &loc, const std::string & fmt, Args... args):
21 invalid_shader_source(loc, format(fmt, args...))
24 virtual ~invalid_shader_source() throw() { }
27 class syntax_error: public invalid_shader_source
30 syntax_error(const Location &, const std::string &, const std::string &);
31 virtual ~syntax_error() throw() { }
34 class parse_error: public invalid_shader_source
37 parse_error(const Location &, const std::string &, const std::string &);
38 virtual ~parse_error() throw() { }
54 unsigned provoking_line;
58 Diagnostic(Severity, int, unsigned, const std::string &);