* errmsg_internal --- add a primary error message text to the current error * * This is exactly like errmsg() except that strings passed to errmsg_internal * are not translated, and are customarily left out of the * internationalization message dictionary. This should be used for "can't * happen" cases that are probably not worth spending translation effort on. * We also use this for certai
| 1225 | * error recursion. |
| 1226 | */ |
| 1227 | void |
| 1228 | errmsg_internal(const char *fmt,...) |
| 1229 | { |
| 1230 | ErrorData *edata = &errordata[errordata_stack_depth]; |
| 1231 | MemoryContext oldcontext; |
| 1232 | |
| 1233 | recursion_depth++; |
| 1234 | CHECK_STACK_DEPTH(); |
| 1235 | oldcontext = MemoryContextSwitchTo(edata->assoc_context); |
| 1236 | |
| 1237 | edata->message_id = fmt; |
| 1238 | EVALUATE_MESSAGE(edata->domain, message, false, false); |
| 1239 | |
| 1240 | MemoryContextSwitchTo(oldcontext); |
| 1241 | recursion_depth--; |
| 1242 | errno = edata->saved_errno; /*CDB*/ |
| 1243 | } |
| 1244 | |
| 1245 | |
| 1246 | /* |