MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / ErrorCtx_Get

Function ErrorCtx_Get

src/errors/errors.c:27–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27ErrorCtx *ErrorCtx_Get(void) {
28 ErrorCtx *ctx = pthread_getspecific(_tlsErrorCtx);
29
30 if(ctx == NULL) {
31 ctx = rm_calloc(1, sizeof(ErrorCtx));
32 int res = pthread_setspecific(_tlsErrorCtx, ctx);
33 ASSERT(res == 0);
34 }
35
36 return ctx;
37}
38
39void ErrorCtx_Clear(void) {
40 ErrorCtx *ctx = ErrorCtx_Get();

Callers 5

ErrorCtx_ClearFunction · 0.85
_ErrorCtx_SetErrorFunction · 0.85
ErrorCtx_EmitExceptionFunction · 0.85

Calls 1

rm_callocFunction · 0.85

Tested by

no test coverage detected