I have a logging framework based on printf
-style formatting:
void Logger::debug(const char *fmt, ...) {
va_list args;
va_start(args, fmt);
this->output(DebugLevel, fmt, args);
va_end(args);
}
If Logger::output
throws, will the compiler unwind the stack properly, or do I need to add a try/catch block with va_end(args)
in the catch clause? Can this be RAII'ed instead, or is va_end
too magic for that? If possible, please include references to the standard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With