| 56 | //------------------------------------------------------------------------------ |
| 57 | |
| 58 | static void _ErrorCtx_SetError(const char *err_fmt, va_list args) { |
| 59 | ErrorCtx *ctx = ErrorCtx_Get(); |
| 60 | ASSERT(ctx != NULL); |
| 61 | |
| 62 | // An error is already set - free it |
| 63 | if(ctx->error != NULL) free(ctx->error); |
| 64 | |
| 65 | int rc __attribute__((unused)); |
| 66 | rc = vasprintf(&ctx->error, err_fmt, args); |
| 67 | } |
| 68 | |
| 69 | void ErrorCtx_SetError(const char *err_fmt, ...) { |
| 70 | // Set the new error |
no test coverage detected