about summary refs log tree commit diff stats
path: root/046closure_name.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-06 17:03:02 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-06 17:03:02 -0800
commit57d01f212c8cddb14f585b3ab32984d11a9222e3 (patch)
tree924df28cf2b5aa37a037f7375343667ec8ca0341 /046closure_name.cc
parent3bcc53bcd6345dc5aa6ddeca949ab59dba6e7590 (diff)
downloadmu-57d01f212c8cddb14f585b3ab32984d11a9222e3.tar.gz
2382
Starting to leave commented out prints again out of desperation.
Diffstat (limited to '046closure_name.cc')
-rw-r--r--046closure_name.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/046closure_name.cc b/046closure_name.cc
index 75803f2d..11945c76 100644
--- a/046closure_name.cc
+++ b/046closure_name.cc
@@ -41,6 +41,7 @@ Transform.push_back(collect_surrounding_spaces);
 :(code)
 void collect_surrounding_spaces(const recipe_ordinal r) {
   trace(9991, "transform") << "--- collect surrounding spaces for recipe " << get(Recipe, r).name << end();
+//?   cerr << "--- collect surrounding spaces for recipe " << get(Recipe, r).name << '\n';
   for (long long int i = 0; i < SIZE(get(Recipe, r).steps); ++i) {
     const instruction& inst = get(Recipe, r).steps.at(i);
     if (inst.is_label) continue;
@@ -71,6 +72,11 @@ void collect_surrounding_spaces(const recipe_ordinal r) {
         continue;
       }
       trace(9993, "name") << "lexically surrounding space for recipe " << get(Recipe, r).name << " comes from " << surrounding_recipe_name << end();
+//?       cerr << "lexically surrounding space for recipe " << get(Recipe, r).name << " comes from " << surrounding_recipe_name << '\n';
+      if (!contains_key(Recipe_ordinal, surrounding_recipe_name)) {
+        raise << "can't find recipe providing surrounding space for " << get(Recipe, r).name << ": " << surrounding_recipe_name << '\n' << end();
+        continue;
+      }
       Surrounding_space[r] = get(Recipe_ordinal, surrounding_recipe_name);
     }
   }