MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / assert_failed_log

Function assert_failed_log

src/custom/impl/utils.cpp:12–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace custom {
11
12void assert_failed_log(
13 const char* file, int line, const char* func, const char* expr,
14 const char* msg_fmt, ...) {
15 std::string msg = ssprintf("`%s' is true at %s:%d: %s", expr, file, line, func);
16 if (msg_fmt) {
17 msg_fmt = convert_fmt_str(msg_fmt);
18 va_list ap;
19 va_start(ap, msg_fmt);
20 msg.append("\nextra message: ");
21 msg.append(svsprintf(msg_fmt, ap));
22 va_end(ap);
23 }
24 printf("%s\n", msg.c_str());
25}
26
27UnImpleWarnLog::UnImpleWarnLog(
28 const std::string& func, const std::string& attr, const std::string& val) {

Callers

nothing calls this directly

Calls 3

convert_fmt_strFunction · 0.85
svsprintfFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected