このページを編集する際は、[[編集に関する方針]]に従ってください。 *概要 [#ke637d02] -対象:8.1.4 -言語:C -[[postgresql-8.1.4/src/include/postgres.h]]にて定義 -assert_enabledがTRUE、かつ、引数conditionがTRUEであれば、エラーメッセージを出して終了する。 *引数 [#b66997a2] +condition : 判別条件。 +errorType : エラー種別。文字列へのポインタである必要。 *実装 [#o3f47ee9] #define TrapMacro(condition, errorType) \ ((bool) ((! assert_enabled) || ! (condition) || \ (ExceptionalCondition(CppAsString(condition), (errorType), \ __FILE__, __LINE__)))) -[[assert_enabled/postgresql-8.1.4]] -[[CppAsString()/postgresql-8.1.4]] -エラーメッセージを出力して終了する。詳細は[[ExceptionalCondition()/postgresql-8.1.4]]参照。 -[[__FILE__>一般用語]] -[[__LINE__>一般用語]] *呼出元 [#se46cdab] -[[AssertMacro()/postgresql-8.1.4]] *概要 [#w49c9c02] * TrapMacro is the same as Trap but it's intended for use in macros: * * #define foo(x) (AssertMacro(x != 0) && bar(x)) * * Isn't CPP fun? *履歴 [#m1a21c99] -作者:[[testnoda:http://d.hatena.ne.jp/testnoda/about]] -作者:[[testnoda/ページ作者]] -日付:2006/9/15 |更新日|更新者|更新内容| |||| *コメント [#vb6e9e07] #comment