MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ error_rethrow() [1/2]

template<typename... Args>
void MayaFlux::Journal::error_rethrow ( Component  component,
Context  context,
std::source_location  location,
const char *  fmt_str,
Args &&...  args 
)
inline

fmt-style overload of error_rethrow().

Catch and log an exception, then rethrow it.

This function is intended to be called within a catch block.

Parameters
ComponentThe component generating the log message.
ContextThe execution context of the log message.
locationThe source location (file, line, function) of the log call.
additional_contextOptional additional context to prepend to the exception message.
Template Parameters
ArgsTypes of the format arguments.
Parameters
fmt_strThe format string.
argsThe format arguments.

Definition at line 348 of file Archivist.hpp.

350{
351 if constexpr (sizeof...(Args) == 0) {
352 error_rethrow(component, context, location,
353 std::string_view(fmt_str));
354 return;
355 }
356 auto additional_context = format_runtime(fmt_str, std::forward<Args>(args)...);
357 error_rethrow(component, context, location, additional_context);
358}
void error_rethrow(Component component, Context context, std::source_location location=std::source_location::current(), std::string_view additional_context="")
Catch and log an exception, then rethrow it.

References error_rethrow(), and format_runtime().

+ Here is the call graph for this function: