MCPcopy Create free account
hub / github.com/ElementsProject/lightning / fatal_vfmt

Function fatal_vfmt

lightningd/log.c:1115–1131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1113}
1114
1115void fatal_vfmt(const char *fmt, va_list ap)
1116{
1117 va_list ap2;
1118
1119 /* You are not allowed to re-use va_lists, so make a copy. */
1120 va_copy(ap2, ap);
1121 vfprintf(stderr, fmt, ap);
1122 fprintf(stderr, "\n");
1123
1124 if (!crashlog)
1125 exit(1);
1126
1127 logv(crashlog, LOG_BROKEN, NULL, true, fmt, ap2);
1128 abort();
1129 /* va_copy() must be matched with va_end(), even if unreachable. */
1130 va_end(ap2);
1131}
1132
1133void fatal(const char *fmt, ...)
1134{

Callers 1

fatalFunction · 0.70

Calls 2

abortFunction · 0.85
logvFunction · 0.70

Tested by

no test coverage detected