diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-01 13:13:10 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-01 13:13:10 -0700 |
commit | 4814bf94e75ffdcbd2a4093eb1ab67851980a37a (patch) | |
tree | 9fde405360c5499fa2ad4b25ca009ed3bcc1f57b /044space.cc | |
parent | 5fdd8e96adcf6f572888078caee62adbee1906a4 (diff) | |
download | mu-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 '044space.cc')
-rw-r--r-- | 044space.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/044space.cc b/044space.cc index a9251364..59b292a5 100644 --- a/044space.cc +++ b/044space.cc @@ -138,7 +138,7 @@ if (curr.name == "new-default-space") { } :(after "void write_memory(reagent x, vector<double> data)") if (x.name == "number-of-locals") { - raise << current_recipe_name() << ": can't write to special name 'number-of-locals'\n" << end(); + raise << maybe(current_recipe_name()) << "can't write to special name 'number-of-locals'\n" << end(); return; } @@ -212,7 +212,7 @@ long long int address(long long int offset, long long int base) { :(after "void write_memory(reagent x, vector<double> data)") if (x.name == "default-space") { if (!scalar(data)) - raise << current_recipe_name() << ": 'default-space' should be of type address:array:location, but tried to write " << to_string(data) << '\n' << end(); + raise << maybe(current_recipe_name()) << "'default-space' should be of type address:array:location, but tried to write " << to_string(data) << '\n' << end(); Current_routine->calls.front().default_space = data.at(0); return; } |