3#ifndef TETL_EXCEPTION_RAISE_HPP
4#define TETL_EXCEPTION_RAISE_HPP
14#if defined(__cpp_consteval)
15template <
typename Exception>
19 #if defined(TETL_ENABLE_CUSTOM_EXCEPTION_HANDLER)
21 etl::exception_handler(Exception{msg});
24 static_cast<int>(loc.line()),
27 Exception{msg}.what(),
34template <
typename Exception>
37 #if defined(TETL_ENABLE_CUSTOM_EXCEPTION_HANDLER)
38 etl::exception_handler(Exception{msg});
44 Exception{msg}.what(),
#define TETL_NO_INLINE
Definition attributes.hpp:19
#define TETL_COLD
Definition attributes.hpp:25
Definition adjacent_find.hpp:8
TETL_NO_INLINE TETL_COLD auto raise(char const *msg, etl::source_location const loc=etl::source_location::current()) -> void
Definition raise.hpp:17
auto assert_handler(Assertion const &msg) -> void
Definition assert.hpp:39
Payload for an assertion.
Definition assert.hpp:21
A class representing information about the source code, such as file names, line numbers,...
Definition source_location.hpp:21
static consteval auto current(uint_least32_t const line=TETL_BUILTIN_LINE(), uint_least32_t const column=TETL_BUILTIN_COLUMN(), char const *const file=TETL_BUILTIN_FILE(), char const *const function=TETL_BUILTIN_FUNCTION()) noexcept -> source_location
Definition source_location.hpp:22