assert.h¶
| File Path | engine/include/conjure/core/assert.h |
| API ↗ | Logging and assertions, Processes, libraries and images |
Assertions.
Structs¶
| File | Description |
|---|---|
assert_info |
Everything known about a failed assertion. |
Enumerations¶
assert_action¶
enum class assert_action : u8 {
BREAK, // break into the debugger (or trap when none is attached)
CONTINUE, // carry on as if the assertion passed
ABORT // terminate the process
};
What the program does after the handler returns.
Type Aliases¶
assert_handler¶
Functions¶
Public¶
current_assert_handler¶
current_assert_handler¶[[nodiscard]] CONJURE_API assert_handler current_assert_handler() noexcept;The handler currently in effect.
default_assert_handler¶
default_assert_handler¶CONJURE_API assert_action default_assert_handler(
const assert_info &info);The built-in handler: logs the failure and asks to break.
detail::format_assert_message¶
detail::format_assert_message¶inline std::string format_assert_message();template <typename... Args> std::string format_assert_message(std::format_string<Args...> format, Args &&...args);detail::report_assert_failure¶
detail::report_assert_failure¶CONJURE_API bool report_assert_failure( const char *expression, const char *file, int line, const char *function, std::string message );Reports a failure to the active handler. Returns true when the caller should break.
set_assert_handler¶
set_assert_handler¶CONJURE_API assert_handler set_assert_handler(
assert_handler handler) noexcept;Installs a new assertion handler and returns the previous one. Pass nullptr to restore the default handler, which logs the failure and breaks.