Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
shader_compilation_exception.h
Go to the documentation of this file.
1 #ifndef SHADER_COMPILATION_EXCEPTION_H
2 #define SHADER_COMPILATION_EXCEPTION_H
3 
4 #include <exception>
5 #include <string>
6 
7 namespace Exceptions {
8  class ShaderCompilationException : public std::exception {
9  private:
10  std::string shader_filename;
11  public:
12  ShaderCompilationException(const std::string& filename) {
13  this->shader_filename = filename;
14  }
15 
16  virtual const char* what() const throw() {
17  return (std::string("Shader failed to compile: ") + this->shader_filename).c_str();
18  }
19  };
20 }
21 
22 #endif
virtual const char * what() const
Definition: shader_compilation_exception.h:16
Definition: shader_compilation_exception.h:8
ShaderCompilationException(const std::string &filename)
Definition: shader_compilation_exception.h:12