| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include <cassert> | ||
| 2 | #include <cstdarg> | ||
| 3 | |||
| 4 | #include "std-includes.h" | ||
| 5 | #include "errors.h" | ||
| 6 | #include "interface-shared.h" | ||
| 7 | #include "libstr.h" | ||
| 8 | |||
| 9 | 473 | void error_impl(const char* error_id, const char* fmt_string, int whichpass, ...) { | |
| 10 | 473 | va_list args; va_start(args, whichpass); | |
| 11 | 241 | char error_buffer[1024]; | |
| 12 | 473 | vsnprintf(error_buffer, sizeof(error_buffer), fmt_string, args); | |
| 13 | |||
| 14 | // convert err_xxx -> Exxx | ||
| 15 | 473 | string errname = STR "E" + (error_id + 4); | |
| 16 | |||
| 17 | 473 | error_interface(errname.data(), whichpass, error_buffer); | |
| 18 | 714 | } | |
| 19 |