Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
system_already_running_exception.h
Go to the documentation of this file.
1 #ifndef SYSTEM_ALREADY_RUNNING_EXCEPTION_H
2 #define SYSTEM_ALREADY_RUNNING_EXCEPTION_H
3 
4 #include <exception>
5 
6 namespace Exceptions {
7  class SystemAlreadyRunningException : public std::exception {
8  private:
9  std::string system_name;
10  public:
11  SystemAlreadyRunningException(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(" is already running!")).c_str();
17  }
18  };
19 }
20 
21 #endif
Definition: system_already_running_exception.h:7
SystemAlreadyRunningException(std::string system_name)
Definition: system_already_running_exception.h:11
virtual const char * what() const
Definition: system_already_running_exception.h:15