diff options
author | John Hodge <tpg@mutabah.net> | 2018-05-26 13:23:10 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-05-26 13:23:10 +0800 |
commit | 8a08a06f31515ed26a1076ffe586de0289dca487 (patch) | |
tree | 1a392c6278c577a383d2c85cf901dd2ab66679b3 /src/include/span.hpp | |
parent | c87c4abc60f76d1304d46e9086a3467ae6f53bfe (diff) | |
download | mrust-8a08a06f31515ed26a1076ffe586de0289dca487.tar.gz |
Include - Add file/line to ASSERT_BUG
Diffstat (limited to 'src/include/span.hpp')
-rw-r--r-- | src/include/span.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/span.hpp b/src/include/span.hpp index 59c960fc..68d6bfdf 100644 --- a/src/include/span.hpp +++ b/src/include/span.hpp @@ -74,4 +74,4 @@ Spanned<T> make_spanned(Span sp, T val) { #define BUG(span, msg) do { ::Span(span).bug([&](::std::ostream& os) { os << __FILE__ << ":" << __LINE__ << ": " << msg; }); throw ::std::runtime_error("Bug fell through"); } while(0) #define TODO(span, msg) do { const char* __TODO_func = __func__; ::Span(span).bug([&](::std::ostream& os) { os << __FILE__ << ":" << __LINE__ << ": TODO: " << __TODO_func << " - " << msg; }); throw ::std::runtime_error("Bug (todo) fell through"); } while(0) -#define ASSERT_BUG(span, cnd, msg) do { if( !(cnd) ) { ::Span(span).bug([&](::std::ostream& os) { os << "ASSERT FAIL: " #cnd << ": " << msg; }); throw ::std::runtime_error("Bug fell through"); } } while(0) +#define ASSERT_BUG(span, cnd, msg) do { if( !(cnd) ) { ::Span(span).bug([&](::std::ostream& os) { os << "ASSERT FAIL: " << __FILE__ << ":" << __LINE__ << ":" #cnd << ": " << msg; }); throw ::std::runtime_error("Bug fell through"); } } while(0) |