| 34 | } |
| 35 | |
| 36 | void _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 | |
| 51 | struct hc_error *hc_error_new(const char *message, ...) { |
| 52 | va_list args; |
nothing calls this directly
no test coverage detected