14#ifndef IOX2_BB_REPORTING_ERROR_REPORTING_CUSTOM_DEFAULT_ERROR_REPORTING_IMPL_HPP
15#define IOX2_BB_REPORTING_ERROR_REPORTING_CUSTOM_DEFAULT_ERROR_REPORTING_IMPL_HPP
43[[noreturn]]
inline void panic() {
58template <
class Message>
67 if (stringifiedCondition !=
nullptr && strnlen(stringifiedCondition, 1) != 0) {
68 stream <<
"Condition: \"" << stringifiedCondition <<
"\" ";
75template <
class Kind,
class Error>
79 auto module = toModule(error);
84 [stringifiedCondition](
auto& stream) ->
auto& {
87 << errorName <<
" (code = " << code.value <<
")] in module [" << moduleName
88 <<
" (id = " << module.value <<
")]");
102 const char* stringifiedCondition) {
104 auto module = toModule(error);
109 [stringifiedCondition](
auto& stream) ->
auto& {
112 << kind.
name <<
"] [" << errorName <<
" (code = " << code.value <<
")] in module ["
113 << moduleName <<
" (id = " << module.value <<
")]");
119template <
class Kind,
class Error>
124 auto module = toModule(error);
126 [stringifiedCondition](
auto& stream) ->
auto& {
129 << kind.name <<
"]");
134template <
class Kind,
class Error,
class Message>
140 const char* stringifiedCondition,
143 auto module = toModule(error);
145 [stringifiedCondition](
auto& stream) ->
auto& {
148 << kind.name <<
"] " << std::forward<Message>(msg));
154template <
class Error>
158 const char* stringifiedCondition) {
162template <
class Error>
166 const char* stringifiedCondition) {
170template <
class Error,
class Message>
175 const char* stringifiedCondition,
180template <
class Error,
class Message>
185 const char* stringifiedCondition,
static ErrorHandlerInterface & get() noexcept
This class provides the public interface to the logger and is used with the 'IOX2_LOG' macro....
#define IOX2_ERROR_INTERNAL_LOG(location, msg_stream)
Log the location of an error.
#define IOX2_ERROR_INTERNAL_LOG_FATAL(location, msg_stream)
Log the location of a fatal error.
#define IOX2_ERROR_INTERNAL_LOG_PANIC(location, msg_stream)
Log a panic invocation.
void report(const bb::detail::SourceLocation &location, Kind kind, const Error &error, const char *stringifiedCondition)
log::LogStream & logStringifiedCondition(log::LogStream &stream, const char *stringifiedCondition)
ErrorCode toCode(const Error &error)
const char * toErrorName(const Error &error)
void report(const bb::detail::SourceLocation &location, Kind, const Error &error, const char *stringifiedCondition)
const char * toModuleName(const Error &error)
Contains all required information about the error. Can be extended as needed without breaking the int...
static constexpr char const * name