MCPcopy Create free account
hub / github.com/apache/cloudberry / errmsg_plural

Function errmsg_plural

src/backend/utils/error/elog.c:1250–1267  ·  view source on GitHub ↗

* errmsg_plural --- add a primary error message text to the current error, * with support for pluralization of the message text */

Source from the content-addressed store, hash-verified

1248 * with support for pluralization of the message text
1249 */
1250void
1251errmsg_plural(const char *fmt_singular, const char *fmt_plural,
1252 unsigned long n, ...)
1253{
1254 ErrorData *edata = &errordata[errordata_stack_depth];
1255 MemoryContext oldcontext;
1256
1257 recursion_depth++;
1258 CHECK_STACK_DEPTH();
1259 oldcontext = MemoryContextSwitchTo(edata->assoc_context);
1260
1261 edata->message_id = fmt_singular;
1262 EVALUATE_MESSAGE_PLURAL(edata->domain, message, false);
1263
1264 MemoryContextSwitchTo(oldcontext);
1265 recursion_depth--;
1266 errno = edata->saved_errno; /*CDB*/
1267}
1268
1269
1270/*

Callers 15

exec_eval_exprFunction · 0.50
ExecuteCallStmtFunction · 0.50
transformPLAssignStmtFunction · 0.50
ParseFuncOrColumnFunction · 0.50
func_select_candidateFunction · 0.50
LookupFuncWithArgsFunction · 0.50
perform_base_backupFunction · 0.50
sendFileFunction · 0.50
SnapBuildExportSnapshotFunction · 0.50

Calls 1

MemoryContextSwitchToFunction · 0.85

Tested by

no test coverage detected