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