このページを編集する際は、編集に関する方針に従ってください。

概要

引数

  1. filename :
  2. lineno :
  3. funcname :

実装

postgresql-8.1.4/src/backend/port/ipc_test.cの定義

void elog_start(const char *filename, int lineno, const char *funcname) { }

postgresql-8.1.4/src/backend/utils/error/elog.cの定義

void elog_start(const char *filename, int lineno, const char *funcname) {

	ErrorData  *edata;
	if (++errordata_stack_depth >= ERRORDATA_STACK_SIZE)
	{
		/*
		 * Wups, stack not big enough.	We treat this as a PANIC condition
		 * because it suggests an infinite loop of errors during error
		 * recovery.
		 */
		errordata_stack_depth = -1;		/* make room on stack */
		ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded")));
	}
	edata = &errordata[errordata_stack_depth];
	edata->filename = filename;
	edata->lineno = lineno;
	edata->funcname = funcname;
	/* errno is saved now so that error parameter eval can't change it */
	edata->saved_errno = errno;

}

呼出元

備考

* elog_start --- startup for old-style API
*
* All that we do here is stash the hidden filename/lineno/funcname
* arguments into a stack entry.
*
* We need this to be separate from elog_finish because there's no other
* portable way to deal with inserting extra arguments into the elog call.
* (If macros with variable numbers of arguments were portable, it'd be
* easy, but they aren't.)

履歴

コメント



トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS