9 #include "opthelpers.h"
14 base_exception::~base_exception() = default;
16 void base_exception::setMessage(const char *msg
, std::va_list args
)
18 /* NOLINTBEGIN(*-array-to-pointer-decay) */
21 int msglen
{std::vsnprintf(nullptr, 0, msg
, args
)};
24 mMessage
.resize(static_cast<size_t>(msglen
)+1);
25 std::vsnprintf(mMessage
.data(), mMessage
.length(), msg
, args2
);
29 /* NOLINTEND(*-array-to-pointer-decay) */