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

◆ error() [1/2]

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

fmt-style overload of error().

Template Parameters
ExceptionTypeThe exception type to throw when behavior == LogAndThrow.
ArgsTypes of the format arguments.
Parameters
fmt_strThe format string.
argsThe format arguments.

Definition at line 286 of file Archivist.hpp.

288{
289 if constexpr (sizeof...(Args) == 0) {
290 Archivist::instance().scribe(Severity::ERROR, component, context,
291 std::string_view(fmt_str), location);
292 throw ExceptionType(std::string(fmt_str));
293 } else {
294 auto msg = format_runtime(fmt_str, std::forward<Args>(args)...);
295 Archivist::instance().scribe(Severity::ERROR, component, context, msg, location);
296 throw ExceptionType(msg);
297 }
298}

References ERROR, format_runtime(), MayaFlux::Journal::Archivist::instance(), and MayaFlux::Journal::Archivist::scribe().

+ Here is the call graph for this function: