matf-rg-engine 1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
|
Base class for all errors. More...
#include <Errors.hpp>
Public Member Functions | |
Error (std::string message, std::source_location location=std::source_location::current()) | |
Construct an Error. | |
const std::string & | message () const |
Get the error message. | |
std::source_location | location () const |
Get the location of the error. | |
virtual std::string | report () const |
Get the error report. You can override this method in derived classes to provide a more detailed error report. | |
Private Attributes | |
std::string | m_message |
std::source_location | m_location |
Base class for all errors.
Exceptions are not meant to be caught. They are meant to be used as a graceful way to stop the program and give a meaningful instruction to the user on how to fix the problem.
|
inlineexplicit |
Construct an Error.
message | The error message. |
location | The location of the error. This is used to get the file, line and function name where the error occurred. |
|
inline |
Get the error message.
|
inline |
Get the location of the error.
|
inlinevirtual |
Get the error report. You can override this method in derived classes to provide a more detailed error report.
Reimplemented in engine::util::EngineError.
|
private |
|
private |