MCPcopy Create free account
hub / github.com/codr7/hacktical-c / _hc_throw

Function _hc_throw

error/error.c:36–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36void _hc_throw(struct hc_error *e) {
37 struct hc_vector *hs = handlers();
38
39 if (!hs->length) {
40 fputs(e->message, stderr);
41 hc_error_free(e);
42 abort();
43 }
44
45 jmp_buf t;
46 memcpy(t, *(jmp_buf *)hc_vector_pop(hs), sizeof(jmp_buf));
47 hc_error = e;
48 longjmp(t, 1);
49}
50
51struct hc_error *hc_error_new(const char *message, ...) {
52 va_list args;

Callers

nothing calls this directly

Calls 3

handlersFunction · 0.85
hc_error_freeFunction · 0.85
hc_vector_popFunction · 0.85

Tested by

no test coverage detected