|
libmx2 2.2.1
C++20 multimedia and game-engine library (SDL2 / OpenGL / Vulkan)
|
General-purpose exception class for the mx library. More...
#include <exception.hpp>
Public Member Functions | |
| Exception (const std::string &text_) | |
| Construct an exception with the given message. | |
| std::string | text () const |
| Retrieve the error message. | |
Private Attributes | |
| std::string | text_value |
| Stored error message. | |
General-purpose exception class for the mx library.
Wraps a human-readable error message that can be retrieved via text(). Throw this instead of std::exception wherever a libmx error occurs.
Definition at line 20 of file exception.hpp.
|
explicit |
Construct an exception with the given message.
| text_ | Human-readable description of the error. |
Definition at line 8 of file exception.cpp.
References text_value.
| std::string mx::Exception::text | ( | ) | const |
Retrieve the error message.
Definition at line 9 of file exception.cpp.
References text_value.
Referenced by mx::VKWindow::createGraphicsPipeline(), mx::Model::openModel(), and mx::Model::setTextures().
|
private |
Stored error message.
Definition at line 34 of file exception.hpp.
Referenced by Exception(), and text().