このページを編集する際は、編集に関する方針に従ってください。
概要 †
- assert_enabledが0以外、かつ、評価式conditionの結果が0以外である時、エラー情報を出力してプログラムを停止する。
引数 †
- condition -- 評価式
- errorType -- エラー情報
実装 †
#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)
呼出元 †
- AssertArg()/ipc_test/postgresql-8.1.4?
備考 †
履歴 †
コメント †