about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-07-20 10:08:42 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-07-20 10:08:52 -0700
commit570494f25cc753de72bfb7826dc34dd830984044 (patch)
treeaded0705051374a48f50210fb5f5bef5ba1986b7
parent387f9c93ed045db2268d05cf2f7a06eff2d2b9f4 (diff)
downloadmu-570494f25cc753de72bfb7826dc34dd830984044.tar.gz
3114
Better error messages on missing traces in Mu scenarios.
-rw-r--r--050scenario.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/050scenario.cc b/050scenario.cc
index cdfab9c5..4ccef4a8 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -537,8 +537,14 @@ void check_trace(const string& expected) {
     if (curr_expected_line == SIZE(expected_lines)) return;
   }
 
-  raise << "missing [" << expected_lines.at(curr_expected_line).contents << "] "
-              << "in trace with label " << expected_lines.at(curr_expected_line).label << '\n' << end();
+  if (Current_scenario && !Scenario_testing_scenario)
+    raise << "\nF - " << Current_scenario->name << ": missing [" << expected_lines.at(curr_expected_line).contents << "] "
+          << "in trace with label '" << expected_lines.at(curr_expected_line).label << "'\n" << end();
+  else
+    raise << "missing [" << expected_lines.at(curr_expected_line).contents << "] "
+          << "in trace with label '" << expected_lines.at(curr_expected_line).label << "'\n" << end();
+  if (!Hide_errors)
+    DUMP(expected_lines.at(curr_expected_line).label);
   Passed = false;
 }