about summary refs log tree commit diff stats
path: root/027trace.cc
diff options
context:
space:
mode:
Diffstat (limited to '027trace.cc')
-rw-r--r--027trace.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/027trace.cc b/027trace.cc
index 12cc7ca3..742432fa 100644
--- a/027trace.cc
+++ b/027trace.cc
@@ -12,6 +12,10 @@ TRACE,
 Recipe_ordinal["trace"] = TRACE;
 :(before "End Primitive Recipe Implementations")
 case TRACE: {
+  if (SIZE(ingredients) != 2) {
+    raise << current_recipe_name() << ": 'trace' takes exactly two ingredients rather than '" << current_instruction().to_string() << "'\n" << end();
+    break;
+  }
   assert(is_literal(current_instruction().ingredients.at(0)));
   string label = current_instruction().ingredients.at(0).name;
   assert(is_literal(current_instruction().ingredients.at(1)));