about summary refs log tree commit diff stats
path: root/subx/003trace.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-08-12 11:38:36 -0700
committerKartik Agaram <vc@akkartik.com>2018-08-12 11:42:39 -0700
commit420cb686819f3651ba66d795e8f8bb7398c4a2bc (patch)
tree175aa800d56335b9242df6b04ae4c6994a608e46 /subx/003trace.cc
parent63cf01588d4b1cbefdd9f22f94a144de0a84806b (diff)
downloadmu-420cb686819f3651ba66d795e8f8bb7398c4a2bc.tar.gz
4507
Side effect: better error messages when the tangler does something
unexpected.
Diffstat (limited to 'subx/003trace.cc')
-rw-r--r--subx/003trace.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/subx/003trace.cc b/subx/003trace.cc
index b442cbdf..5ab9e955 100644
--- a/subx/003trace.cc
+++ b/subx/003trace.cc
@@ -356,6 +356,10 @@ bool trace_doesnt_contain(string label, string line) {
 
 bool trace_doesnt_contain(string expected) {
   vector<string> tmp = split_first(expected, ": ");
+  if (SIZE(tmp) == 1) {
+    raise << expected << ": missing label or contents in trace line\n" << end();
+    assert(false);
+  }
   return trace_doesnt_contain(tmp.at(0), tmp.at(1));
 }