On Mon, Oct 5, 2009 at 6:05 PM, Geoffrey Hutchison <ge...@geoffhutchison.net> wrote: >> When a test fails (e.g. file formats not available), it still >> continues and can easily segfault. Is it possible to make OB_ASSERT > > I think we'd want something like OB_FATAL for that case.
We have OB_REQUIRE for this: void report_error(const char* msg, const char* file, int line, const char* func_name, bool require = false) { std::cout << file << ":" << line << ": " << msg << " (FAIL)" << std::endl; if (require) exit(-1); } ... #define OB_REQUIRE(exp) \ ( (exp) ? static_cast<void>(0) : report_error(#exp, __FILE__, __LINE__, FUNCTION_SIGNATURE, true) ) Tim > -Geoff > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > OpenBabel-Devel mailing list > OpenBabel-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-devel > ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel