MCPcopy Create free account
hub / github.com/NetSys/bess / pb_error

Function pb_error

core/message.cc:36–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#include "utils/format.h"
35
36pb_error_t pb_error(int code, const char *fmt, ...) {
37 pb_error_t p;
38
39 p.set_code(code);
40
41 if (fmt) {
42 va_list ap;
43 va_start(ap, fmt);
44 const std::string message = bess::utils::FormatVarg(fmt, ap);
45 va_end(ap);
46 p.set_errmsg(message);
47 }
48
49 return p;
50}
51
52using CommandError = bess::pb::Error;
53

Callers 1

pb_errnoFunction · 0.85

Calls 1

FormatVargFunction · 0.85

Tested by

no test coverage detected