Etermal
Embeddable Terminal and shell for OpenGL
termError.h
1 #ifndef ETERMAL_TERMINAL_ERROR_H_INCLUDED
2 #define ETERMAL_TERMINAL_ERROR_H_INCLUDED
3 
4 #include <exception>
5 #include <string>
6 
7 namespace etm {
8 
13  class termError: public std::exception {
14  public:
17  std::string location;
19  std::string message;
22  int code;
31  bool severe;
32 
38 
46  termError(const std::string &location, const std::string &message, int code, bool severe) noexcept;
47 
54  const char *what() const noexcept override;
55  };
56 }
57 
58 
59 #endif
etm::termError::severe
bool severe
If the error is severe or not.
Definition: termError.h:31
etm::termError::message
std::string message
The error message.
Definition: termError.h:19
etm::termError::termError
termError(const std::string &location, const std::string &message, int code, bool severe) noexcept
Construct a new termError with arguments.
etm::termError::termError
termError()
Construct a new termError, setting code and severe to 0 and false, respectively.
etm::termError::location
std::string location
The location within the etm namespace that the error was detected.
Definition: termError.h:17
etm::termError::code
int code
The error code.
Definition: termError.h:22
etm::termError
Contains information about an error that was encountered by the Terminal.
Definition: termError.h:13
etm::termError::what
const char * what() const noexcept override
Returns the c_str() of message.