NS_ABORT_IF_FALSE

この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

Summary

Macro

Aborts program execution if the first macro argument does not evaluate to true in a debug build and does nothing (including not evaluating the expression) in a non-debug build. In a debug build the failure text is written to console (stderr), into the NSPR debug log, and on Windows a dialog box is opened.  There is no way to prevent such an abort from happening without modifying source code and recompiling, so use this macro only when you are sure the given condition is always true.

Syntax

NS_ABORT_IF_FALSE(expressionToTest, "error text");

See also

Document Tags and Contributors

Contributors to this page: Waldo
最終更新者: Waldo,