From 4814bf94e75ffdcbd2a4093eb1ab67851980a37a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 1 Oct 2015 13:13:10 -0700 Subject: 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? --- 033exclusive_container.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '033exclusive_container.cc') 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; -- cgit 1.4.1-2-gfad0