Arquivos
hhvm/hphp
bsimmers 5759bd051b Add assert_throw and assert_log
This diff introduces assert_throw, assert_log, and always_assert_ versions of
the two. They behave similarly to assert, but assert_throw throws a
FailedAssertion exception instead of calling abort. This lets us catch the
exception and add additional debug info to the stacktrace file. In the case of
the IR, this is the current Trace. assert_log takes the condition to check and
a lambda that is expected to return a std::string. If the condition fails, the
lambda will be evaluated and the text returned will be included in the
stacktrace file.

I've left assert_throw off by default so people have to opt into it
locally or in Perflab (see the comment in assert_throw.h)
2013-03-18 15:12:16 -07:00
..
2013-03-18 15:12:16 -07:00
2013-02-11 02:10:41 -08:00
2013-03-14 14:27:16 -07:00
2013-03-18 15:12:16 -07:00
2013-03-14 14:27:16 -07:00
2013-03-18 15:12:16 -07:00
2013-03-18 15:12:16 -07:00
2013-02-11 02:10:41 -08:00
2013-02-11 02:10:41 -08:00