| Macro SEQAN_CHECK Force abortion of program if a condition is not met, regardless of debugging settings. SEQAN_CHECK(condition, msg[, args]) Include Headers seqan/basic.h Parameters
msg | A format string.
args | An optional list of arguments.
Remarks Use this if something really unexpected happens inside your functions and there is no way to report this through the API. A good example would be logic errors, e.g. invalid values. Examples In the following example, the SEQAN_CHECK stops program execution if a value is added to MyEnum but the function foo is not updated accordingly. enum MyEnum { VALUE_ONE, VALUE_TWO }; bool foo(MyEnum x) { SEQAN_CHECK((x == VALUE_ONE || x == VALUE_TWO), "Invalid value for x == %d.", x); switch (x) { case VALUE_ONE: // do something return true; case VALUE_TWO: // do something return true; } return false; // Should never reach here, checked above with SEQAN_CHECK. } See Also SEQAN_ASSERT_EQ, SEQAN_ASSERT_GEQ, SEQAN_ASSERT, SEQAN_ASSERT_LT, SEQAN_FAIL, SEQAN_ASSERT_LEQ, SEQAN_ASSERT_IN_DELTA, SEQAN_ASSERT_NOT, SEQAN_ASSERT_NEQ, SEQAN_ASSERT_GT SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2014/10/13 16:12:59