* errmsg_plural --- add a primary error message text to the current error, * with support for pluralization of the message text */
| 1248 | * with support for pluralization of the message text |
| 1249 | */ |
| 1250 | void |
| 1251 | errmsg_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 | /* |
no test coverage detected