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 /033exclusive_container.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 '033exclusive_container.cc')
-rw-r--r-- | 033exclusive_container.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/033exclusive_container.cc b/033exclusive_container.cc index 58276b9a..ae4a7e4c 100644 --- a/033exclusive_container.cc +++ b/033exclusive_container.cc @@ -84,13 +84,13 @@ Recipe_ordinal["maybe-convert"] = MAYBE_CONVERT; :(before "End Primitive Recipe Implementations") case MAYBE_CONVERT: { if (SIZE(ingredients) != 2) { - raise << current_recipe_name() << ": 'maybe-convert' expects exactly 2 ingredients in '" << current_instruction().to_string() << "'\n" << end(); + raise << maybe(current_recipe_name()) << "'maybe-convert' expects exactly 2 ingredients in '" << current_instruction().to_string() << "'\n" << end(); break; } reagent base = canonize(current_instruction().ingredients.at(0)); long long int base_address = base.value; if (base_address == 0) { - raise << current_recipe_name() << ": tried to access location 0 in '" << current_instruction().to_string() << "'\n" << end(); + raise << maybe(current_recipe_name()) << "tried to access location 0 in '" << current_instruction().to_string() << "'\n" << end(); break; } if (base.types.empty() || Type[base.types.at(0)].kind != exclusive_container) { @@ -98,7 +98,7 @@ case MAYBE_CONVERT: { break; } if (!is_literal(current_instruction().ingredients.at(1))) { - raise << current_recipe_name() << ": second ingredient of 'maybe-convert' should have type 'variant', but got " << current_instruction().ingredients.at(1).original_string << '\n' << end(); + raise << maybe(current_recipe_name()) << "second ingredient of 'maybe-convert' should have type 'variant', but got " << current_instruction().ingredients.at(1).original_string << '\n' << end(); break; } long long int tag = current_instruction().ingredients.at(1).value; |