このページを編集する際は、[[編集に関する方針]]に従ってください。
*概要 [#ab78a71b]
-対象:[[ipc_test/postgresql-8.1.4]]
-定義:[[postgresql-8.1.4/src/include/postgres.h]]
-assert_enabledが0以外、かつ、評価式conditionの結果が0以外である時、エラー情報を出力してプログラムを停止する。
*引数 [#q70927b7]
-condition -- 評価式
-errorType -- エラー情報
*実装 [#kd7c5591]
#define Trap(condition, errorType) \
do { \
if ((assert_enabled) && (condition)) \
-[[assert_enabled/ipc_test/postgresql-8.1.4]] -- bool型の外部変数
ExceptionalCondition(CppAsString(condition), (errorType), \
-[[ExceptionalCondition()/ipc_test/postgresql-8.1.4]] -- エラー情報を標準エラー出力に出力した後、プログラムを停止する。(詳細はリンクするソースファイルによって2通りがある)
-[[CppAsString()/ipc_test/postgresql-8.1.4]] -- HAVE_STRINGIZEがdefineで定義された場合のバイナリでは、[[文字列化演算子#>一般用語]]を使用する。そうでない場合、ダブルクォーテーションを使用する。
__FILE__, __LINE__); \
} while (0)
*呼出元 [#rc08fe70]
//-[[AssertArg()/ipc_test/postgresql-8.1.4]]
-[[Assert()/ipc_test/postgresql-8.1.4]]
*備考 [#t3c4c339]
*履歴 [#l3722bec]
|更新日|更新者|更新内容|
|2007/2/25|[[testnoda/ページ作者]]|Wikiページ作成、概要作成|
|2007/11/11|[[testnoda/ページ作者]]|[[Trap()/postgresql-8.1.4]]より移行|
*コメント [#i379fb05]
- VwjnFugyfCqfBHNEjD -- [[nzvxhf]] &new{2008-10-08 (水) 06:50:29};
- FRhYLuME -- [[wxbsjuop]] &new{2008-10-19 (日) 18:36:58};
#comment