about summary refs log tree commit diff stats
path: root/003trace.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-21 18:52:31 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-21 18:52:31 -0800
commit7a23ce3d56e9216a75e93906cccfc297c9e46e09 (patch)
tree6616366642c6fe7ff5327ed7c3272965a58f151b /003trace.cc
parent136412d263cc241bf9dfbe46271547615e3ba03d (diff)
downloadmu-7a23ce3d56e9216a75e93906cccfc297c9e46e09.tar.gz
2469 - start logging all warnings again
Since we switched to end() for terminating trace lines, there's a lot
less reason to avoid this. We don't nest trace statements either
anymore.

I'd like to not hide warnings and still be able to make assertions on
their absence so that printed warnings also express as failed tests.
Diffstat (limited to '003trace.cc')
-rw-r--r--003trace.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/003trace.cc b/003trace.cc
index 4a563fc6..965940a8 100644
--- a/003trace.cc
+++ b/003trace.cc
@@ -160,10 +160,8 @@ trace_stream* Trace_stream = NULL;
 
 // Top-level helper. IMPORTANT: can't nest.
 #define trace(...)  !Trace_stream ? cerr /*print nothing*/ : Trace_stream->stream(__VA_ARGS__)
-// Errors and warnings should go straight to cerr by default since calls to trace() have
-// some unfriendly constraints (they delay printing, they can't nest)
-#define raise  ((!Trace_stream || !Hide_warnings) ? (tb_shutdown(),cerr) /*do print*/ : Trace_stream->stream(Warning_depth, "warn"))
-#define raise_error  ((!Trace_stream || !Hide_errors) ? (tb_shutdown(),cerr) /*do print*/ : Trace_stream->stream(Error_depth, "error"))
+#define raise  (!Trace_stream ? (tb_shutdown(),cerr) /*do print*/ : Trace_stream->stream(Warning_depth, "warn"))
+#define raise_error  (!Trace_stream ? (tb_shutdown(),cerr) /*do print*/ : Trace_stream->stream(Error_depth, "error"))
 
 :(before "End Types")
 struct end {};