このページを編集する際は、編集に関する方針に従ってください。
* ExceptionalCondition - Handles the failure of an Assert()
| データ型 | 引数名 | 説明 |
| char * | conditionName | エラー状態 |
| char * | errorType | エラー値 |
| char * | fileName | ファイル名 |
| int | lineNumber | 行番号 |
int ExceptionalCondition(char *conditionName,
char *errorType, char *fileName, int lineNumber)
{
fprintf(stderr, "TRAP: %s(\"%s\", File: \"%s\", Line: %d)\n", errorType, conditionName, fileName, lineNumber); abort(); return 0;
}
int ExceptionalCondition(char *conditionName,
char *errorType, char *fileName, int lineNumber)
{
if (!PointerIsValid(conditionName)
|| !PointerIsValid(fileName)
|| !PointerIsValid(errorType))
write_stderr("TRAP: ExceptionalCondition: bad arguments\n");
else
{
write_stderr("TRAP: %s(\"%s\", File: \"%s\", Line: %d)\n",
errorType, conditionName,
fileName, lineNumber);
}
#ifdef SLEEP_ON_ASSERT
/* * It would be nice to use pg_usleep() here, but only does 2000 sec or 33 * minutes, which seems too short. */ sleep(1000000);
#endif
abort(); return 0;
}
| 更新日 | 更新者 | 更新内容 |