#include <exception>
#include <source_location>
#include <spdlog/fmt/fmt.h>
Go to the source code of this file.
|
class | foray::Exception |
| An extension of std::exception providing support for formatted error messages. Exceptions should always be catched via "catch (const std::exception& ex)", and thrown by value (Just use builtin static throw functions) More...
|
|
|
#define | FORAY_ASSERTFMT(val, fmt, ...) |
| Assertion macro for formatted error messages.
|
|
#define | FORAY_THROWFMT(fmt, ...) |
| Macro for throwing an exception with formatted error message argument.
|
|
|
void | foray::Assert (bool condition, const source_location location=source_location::current()) |
| Asserts condition. Throws a generic error message if conditition is false.
|
|
void | foray::Assert (bool condition, std::string_view message, const source_location location=source_location::current()) |
| Asserts condition. Throws a user defined error message if conditition is false.
|
|
◆ FORAY_ASSERTFMT
#define FORAY_ASSERTFMT |
( |
|
val, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| |
Value: if(!(val)) \
{ \
foray::Exception::Throw(__foray_location, fmt, __VA_ARGS__); \
}
std::source_location source_location
Definition foray_exception.hpp:8
Assertion macro for formatted error messages.
◆ FORAY_THROWFMT
#define FORAY_THROWFMT |
( |
|
fmt, |
|
|
|
... |
|
) |
| |
Value: { \
foray::Exception::Throw(__foray_location, fmt, __VA_ARGS__); \
}
Macro for throwing an exception with formatted error message argument.
◆ source_location