matf-rg-engine 1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
|
Represents an error that occurred in the user's code. More...
#include <Errors.hpp>
Public Member Functions | |
Error (std::string message, std::source_location location=std::source_location::current()) | |
Construct an Error. | |
Public Member Functions inherited from engine::util::Error | |
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. | |
Represents an error that occurred in the user's code.
This is meant to be used to report errors that occur in the user's code. It is not meant to be used to report errors that occur in the engine.
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.
Inherit from this class to create your own errors.
|
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. |