Namespace fwdpp::debug¶
Contents
Detailed Description¶
Debugging routines In general, the library does not throw exceptions during the execution of simulation-related algorithms. Rather, exception handling is limited to sanity-checking parameters inputs, etc., for object construction and other routines. However, it is sometimes useful to perform expensive checks on the data integrity of a simulated population. The routines in Namespace fwdpp::debug allow you to do that without affecting the performance of code compiled in “release” mode. Following the tradition of the C language, compiling with -DNDEBUG signals that a release-mode build is desired, meaning that expensive runtime checks are disables. If that symbol is not defined, then various runtime checks are enabled, and any failed checks with throw std::runtime_error. The message field of the error will begin with “FWDPP DEBUG:”. Functions in namespace Namespace fwdpp::debug will be optimized out when code is compiled with -DNDEBUG, as they evaluate to empty functions.