|
FifeGUI 0.2.0
A C++ GUI library designed for games.
|
#include <exception.hpp>
Public Member Functions | |
| Exception (std::string message, std::source_location location=std::source_location::current()) | |
| std::string const & | getFilename () const |
| std::string const & | getFunction () const |
| unsigned int | getLine () const |
| std::string const & | getMessage () const |
| char const * | what () const noexcept override |
An exception class containing a message, a file, and a line number where the exception occurred.
This class is used to throw exceptions in the GUI code with detailed information about the source location. The exception will contain the filename, line number, and function name where the exception was thrown. This makes it easier to identify the source of the exception.
The exception is thrown using the fcn::throwException function, which automatically captures the source location (filename, line number, and function name).
EXAMPLE:
This is a header only class and so its not exported via FIFEGUI_API.
Definition at line 35 of file exception.hpp.
|
inlineexplicit |
Constructor that takes a message and source location.
| message | The error message of the exception. |
| location | The source location of where the exception occurred. |
Definition at line 44 of file exception.hpp.
|
inline |
Gets the filename where the exception occurred.
Definition at line 88 of file exception.hpp.
|
inline |
Gets the function name where the exception occurred.
Definition at line 68 of file exception.hpp.
|
inline |
Gets the line number where the exception occurred.
Definition at line 98 of file exception.hpp.
|
inline |
Gets the message of the exception.
Definition at line 78 of file exception.hpp.
|
inlineoverridenoexcept |
Returns a pointer to a null-terminated string with a description of the exception.
Definition at line 58 of file exception.hpp.