summaryrefslogtreecommitdiff
path: root/src/include/span.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/span.hpp')
-rw-r--r--src/include/span.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/span.hpp b/src/include/span.hpp
index c8c61627..452f37ba 100644
--- a/src/include/span.hpp
+++ b/src/include/span.hpp
@@ -52,5 +52,6 @@ struct Span
void note(::std::function<void(::std::ostream&)> msg) const;
};
-#define ERROR(span, code, msg) do { (span).error(code, [](::std::ostream& os) { os << msg; }); throw ::std::runtime_error("Error fell through" #code); } while(0)
+#define ERROR(span, code, msg) do { (span).error(code, [&](::std::ostream& os) { os << msg; }); throw ::std::runtime_error("Error fell through" #code); } while(0)
+#define BUG(span, msg) do { (span).bug([&](::std::ostream& os) { os << msg; }); throw ::std::runtime_error("Bug fell through"); } while(0)