about summary refs log tree commit diff stats
path: root/047global.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-01 13:13:10 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-01 13:13:10 -0700
commit4814bf94e75ffdcbd2a4093eb1ab67851980a37a (patch)
tree9fde405360c5499fa2ad4b25ca009ed3bcc1f57b /047global.cc
parent5fdd8e96adcf6f572888078caee62adbee1906a4 (diff)
downloadmu-4814bf94e75ffdcbd2a4093eb1ab67851980a37a.tar.gz
2226 - standardize warning format
Always show recipe name where error occurred. But don't show internal
'interactive' name for sandboxes, that's just confusing.

What started out as warnings are now ossifying into errors that halt all
execution. Is this how things went with C and Unix as well?
Diffstat (limited to '047global.cc')
-rw-r--r--047global.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/047global.cc b/047global.cc
index 90646f49..00e8ff15 100644
--- a/047global.cc
+++ b/047global.cc
@@ -32,7 +32,7 @@ global_space = 0;
 :(after "void write_memory(reagent x, vector<double> data)")
   if (x.name == "global-space") {
     if (!scalar(data))
-      raise << current_recipe_name() << ": 'global-space' should be of type address:array:location, but tried to write " << to_string(data) << '\n' << end();
+      raise << maybe(current_recipe_name()) << "'global-space' should be of type address:array:location, but tried to write " << to_string(data) << '\n' << end();
     if (Current_routine->global_space)
       raise << "routine already has a global-space; you can't over-write your globals" << end();
     Current_routine->global_space = data.at(0);