Macro
SEQAN_FAIL
Force abortion of program, regardless of debugging settings.
SEQAN_FAIL(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_FAIL is there if a possible value is added to MyEnum but the function foo is not updated accordingly.
enum MyEnum {
VALUE_ONE,
VALUE_TWO
};
bool foo(MyEnum x) {
switch (x) {
case VALUE_ONE:
// do something
return true;
case VALUE_TWO:
// do something
return true;
}
SEQAN_FAIL("Logic error. Should never reach here. x == %d.", x);
return false;
}
See Also
SEQAN_ASSERT_GEQ, SEQAN_ASSERT_EQ, SEQAN_ASSERT, SEQAN_ASSERT_LEQ, SEQAN_ASSERT_LT, SEQAN_CHECK, 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