Etermal
Embeddable Terminal and shell for OpenGL
Public Member Functions | Public Attributes | List of all members
etm::termError Class Reference

Contains information about an error that was encountered by the Terminal. More...

#include <termError.h>

Inheritance diagram for etm::termError:

Public Member Functions

 termError ()
 Construct a new termError, setting code and severe to 0 and false, respectively.
 
 termError (const std::string &location, const std::string &message, int code, bool severe) noexcept
 Construct a new termError with arguments. More...
 
const char * what () const noexcept override
 Returns the c_str() of message. More...
 

Public Attributes

std::string location
 The location within the etm namespace that the error was detected.
 
std::string message
 The error message.
 
int code
 The error code. More...
 
bool severe
 If the error is severe or not. More...
 

Detailed Description

Contains information about an error that was encountered by the Terminal.

Constructor & Destructor Documentation

◆ termError()

etm::termError::termError ( const std::string &  location,
const std::string &  message,
int  code,
bool  severe 
)
noexcept

Construct a new termError with arguments.

Parameters
[in]locationThe location at which the error was detected.
[in]messageThe error message
[in]codeThe error code
[in]severeWhether the error is severe or not.

Member Function Documentation

◆ what()

const char* etm::termError::what ( ) const
overridenoexcept

Returns the c_str() of message.

Note
The lifetime of the returned c-string is tied to that of message, and by extension the entire object.
Returns
message

Member Data Documentation

◆ code

int etm::termError::code

The error code.

Set to zero when not applicable.

◆ severe

bool etm::termError::severe

If the error is severe or not.

Severe errors indicate there's a problem that affects the entire terminal, that the function that raised the error cannot contain negative side effects. Non-severe errors are ones that, for the most part, are contained by the raiser, allowing the rest of the code to function as normal.


The documentation for this class was generated from the following file: