diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-07-21 19:22:03 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-07-21 19:22:03 -0700 |
commit | 8d72e5652147a0218f36757fd9171f3f2beda887 (patch) | |
tree | b95edd6bb86f7d421327d2f436e0c2d375cb795d /053recipe_header.cc | |
parent | fc19980d91e306df87b308d0c2875a2dcaf4b5c7 (diff) | |
download | mu-8d72e5652147a0218f36757fd9171f3f2beda887.tar.gz |
3120
Always show instruction before any transforms in error messages. This is likely going to make some errors unclear because they *need* to show the original instruction. But if we don't have tests for those situations did they ever really work?
Diffstat (limited to '053recipe_header.cc')
-rw-r--r-- | 053recipe_header.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/053recipe_header.cc b/053recipe_header.cc index 06abcc4b..3f3c5403 100644 --- a/053recipe_header.cc +++ b/053recipe_header.cc @@ -231,13 +231,13 @@ void check_calls_against_header(const recipe_ordinal r) { for (long int i = 0; i < min(SIZE(inst.ingredients), SIZE(callee.ingredients)); ++i) { // ingredients coerced from call to callee if (!types_coercible(callee.ingredients.at(i), inst.ingredients.at(i))) - raise << maybe(caller.name) << "ingredient " << i << " has the wrong type at '" << to_original_string(inst) << "'\n" << end(); + raise << maybe(caller.name) << "ingredient " << i << " has the wrong type at '" << inst.original_string << "'\n" << end(); } for (long int i = 0; i < min(SIZE(inst.products), SIZE(callee.products)); ++i) { if (is_dummy(inst.products.at(i))) continue; // products coerced from callee to call if (!types_coercible(inst.products.at(i), callee.products.at(i))) - raise << maybe(caller.name) << "product " << i << " has the wrong type at '" << to_original_string(inst) << "'\n" << end(); + raise << maybe(caller.name) << "product " << i << " has the wrong type at '" << inst.original_string << "'\n" << end(); } } } @@ -267,12 +267,12 @@ void check_reply_instructions_against_header(const recipe_ordinal r) { const instruction& inst = caller_recipe.steps.at(i); if (inst.name != "reply" && inst.name != "return") continue; if (SIZE(caller_recipe.products) != SIZE(inst.ingredients)) { - raise << maybe(caller_recipe.name) << "replied with the wrong number of products at '" << to_original_string(inst) << "'\n" << end(); + raise << maybe(caller_recipe.name) << "replied with the wrong number of products at '" << inst.original_string << "'\n" << end(); continue; } for (int i = 0; i < SIZE(caller_recipe.products); ++i) { if (!types_match(caller_recipe.products.at(i), inst.ingredients.at(i))) - raise << maybe(caller_recipe.name) << "replied with the wrong type at '" << to_original_string(inst) << "'\n" << end(); + raise << maybe(caller_recipe.name) << "replied with the wrong type at '" << inst.original_string << "'\n" << end(); } } } |