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 /031address.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 '031address.cc')
-rw-r--r-- | 031address.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/031address.cc b/031address.cc index 5514b8c2..c074fe76 100644 --- a/031address.cc +++ b/031address.cc @@ -52,12 +52,12 @@ reagent lookup_memory(reagent x) { static const type_ordinal ADDRESS = Type_ordinal["address"]; reagent result; if (x.types.empty() || x.types.at(0) != ADDRESS) { - raise << current_recipe_name() << ": tried to /lookup " << x.original_string << " but it isn't an address\n" << end(); + raise << maybe(current_recipe_name()) << "tried to /lookup " << x.original_string << " but it isn't an address\n" << end(); return result; } // compute value if (x.value == 0) { - raise << current_recipe_name() << ": tried to /lookup 0\n" << end(); + raise << maybe(current_recipe_name()) << "tried to /lookup 0\n" << end(); return result; } result.set_value(Memory[x.value]); @@ -184,7 +184,7 @@ Recipe_ordinal["$dump"] = _DUMP; :(before "End Primitive Recipe Implementations") case _DUMP: { reagent after_canonize = canonize(current_instruction().ingredients.at(0)); - cerr << current_recipe_name() << ": " << current_instruction().ingredients.at(0).name << ' ' << no_scientific(current_instruction().ingredients.at(0).value) << " => " << no_scientific(after_canonize.value) << " => " << no_scientific(Memory[after_canonize.value]) << '\n'; + cerr << maybe(current_recipe_name()) << "" << current_instruction().ingredients.at(0).name << ' ' << no_scientific(current_instruction().ingredients.at(0).value) << " => " << no_scientific(after_canonize.value) << " => " << no_scientific(Memory[after_canonize.value]) << '\n'; break; } |