Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2007-08-21 20:32:53
Size: 299
Editor: gtang
Comment:
Revision 4 as of 2007-08-21 20:38:57
Size: 469
Editor: gtang
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
EMAN2 has wrapped standard assert call as Assert. The header file is "emassert.h" instead of standard <cassert> or <assert.h>. The assert call will only be available when you enable "DEBUG" in the cmake compilation configurations. it will not be compiled into the release mode (default mode). EMAN2 has wrapped standard assert call as Assert. The header file is "emassert.h" instead of standard <cassert> or <assert.h>. The assert call will only be available when you enable "DEBUG" in the cmake compilation configurations. it will not be compiled into the release mode (default mode). For example:
{{{ #include "emassert.h"
...
Assert (x==1)
...
}}}
Line 3: Line 8:
  If you need kind of assertion behavior in production code. We suggest you consider exception instead.

EMAN2 has wrapped standard assert call as Assert. The header file is "emassert.h" instead of standard <cassert> or <assert.h>. The assert call will only be available when you enable "DEBUG" in the cmake compilation configurations. it will not be compiled into the release mode (default mode). For example: {{{ #include "emassert.h" ... Assert (x==1) ... }}}

If you need kind of assertion behavior in production code. We suggest you consider exception instead.

eman2Assertion (last edited 2008-11-26 04:42:29 by localhost)