15 #ifndef SERIALBOX_CORE_EXCEPTION_H 16 #define SERIALBOX_CORE_EXCEPTION_H 18 #include <boost/format.hpp> 36 template <
typename... Args>
38 :
std::runtime_error(formatVargs(fmt,
std::forward<Args>(args)...)) {}
41 template <
typename... Args>
42 std::string formatVargs(
const std::string& fmt, Args&&... args) {
44 int unroll[]{0, (f % std::forward<Args>(args), 0)...};
45 static_cast<void>(unroll);
Namespace of the serialbox library.
Exception class which stores a human-readable error description.
Exception(const char *fmt, Args &&... args)
Variadic constructor to support printf-style arguments.