MCPcopy Create free account
hub / github.com/GJDuck/e9patch / e9error_impl

Function e9error_impl

src/e9patch/e9loader_pe.cpp:215–231  ·  view source on GitHub ↗

* Write an error message and exit. */

Source from the content-addressed store, hash-verified

213 * Write an error message and exit.
214 */
215static NO_INLINE NO_RETURN void e9error_impl(void *stderr,
216 write_console_t WriteConsole, const char *msg, ...)
217{
218 char buf[BUFSIZ], *str = buf;
219 str = e9write_str(str, "e9patch loader error: ");
220 va_list ap;
221 va_start(ap, msg);
222 str = e9write_format(str, msg, ap);
223 va_end(ap);
224 str = e9write_char(str, '\n');
225
226 size_t len = str - buf;
227 WriteConsole(stderr, buf, len, NULL, NULL);
228 while (true)
229 asm volatile ("ud2");
230 __builtin_unreachable();
231}
232#define e9error(msg, ...) \
233 e9error_impl(stderr, WriteConsole, msg, ##__VA_ARGS__)
234

Callers

nothing calls this directly

Calls 3

e9write_strFunction · 0.85
e9write_formatFunction · 0.85
e9write_charFunction · 0.85

Tested by

no test coverage detected