Rosetta  3.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Macros
PyAssert.hh File Reference
#include <utility/exit.hh>

Namespaces

 utility
 comment 0
 
 utility::py
 

Macros

#define PyAssert(x, m)   { if(!(x)) utility_exit_with_message(m); }
 PyAssert macro. Check if statement is true and call utility_exit otherwise, which in turn will throw boost::python exception that python interpreter will catch. This macro works only when PYROSETTA macro was defined. More...
 

Detailed Description

Author
Sergey Lyskov
Note
Defining special assert version for PyRosetta build. It will allow to perform some additional verification for PyRosetta build.

Macro Definition Documentation

#define PyAssert (   x,
 
)    { if(!(x)) utility_exit_with_message(m); }

PyAssert macro. Check if statement is true and call utility_exit otherwise, which in turn will throw boost::python exception that python interpreter will catch. This macro works only when PYROSETTA macro was defined.

Example of usage: PyAssert( (residue_num > 0) && (residue_num<=pose.n_residue()), "Residue not found in pose!" )