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

Function ErrorCtx_EmitException

src/errors/errors.c:99–110  ·  view source on GitHub ↗

Reply to caller with error

Source from the content-addressed store, hash-verified

97
98// Reply to caller with error
99void ErrorCtx_EmitException(void) {
100 ErrorCtx *ctx = ErrorCtx_Get();
101 ASSERT(ctx != NULL);
102
103 if(ctx->error != NULL) {
104 RedisModuleCtx *rm_ctx = QueryCtx_GetRedisModuleCtx();
105 RedisModule_ReplyWithError(rm_ctx, ctx->error);
106 }
107
108 // clear error context once error emitted
109 ErrorCtx_Clear();
110}
111
112// Returns true if error is set
113inline bool ErrorCtx_EncounteredError(void) {

Callers 3

ResultSet_ReplyFunction · 0.85
_queryFunction · 0.85
Graph_ExplainFunction · 0.85

Calls 3

ErrorCtx_GetFunction · 0.85
ErrorCtx_ClearFunction · 0.85

Tested by

no test coverage detected