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