congestvpn/util.cpp

16 lines
285 B
C++

#include <cstdio>
#include "util.hpp"
MsgException::MsgException(const std::string& msg, int code)
: _msg(msg), _code(code)
{
_what = _msg;
if(_code != 0) {
char remainder[20];
sprintf(remainder, " (code %d)", _code);
_what += remainder;
}
}