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 /023boolean.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 '023boolean.cc')
-rw-r--r-- | 023boolean.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/023boolean.cc b/023boolean.cc index e556f47c..24752e72 100644 --- a/023boolean.cc +++ b/023boolean.cc @@ -8,7 +8,7 @@ Recipe_ordinal["and"] = AND; case AND: { for (long long int i = 0; i < SIZE(inst.ingredients); ++i) { if (!is_mu_scalar(inst.ingredients.at(i))) { - raise << Recipe[r].name << ": 'and' requires boolean ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end(); + raise << maybe(Recipe[r].name) << "'and' requires boolean ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end(); goto finish_checking_instruction; } } @@ -58,7 +58,7 @@ Recipe_ordinal["or"] = OR; case OR: { for (long long int i = 0; i < SIZE(inst.ingredients); ++i) { if (!is_mu_scalar(inst.ingredients.at(i))) { - raise << Recipe[r].name << ": 'and' requires boolean ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end(); + raise << maybe(Recipe[r].name) << "'and' requires boolean ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end(); goto finish_checking_instruction; } } @@ -107,12 +107,12 @@ Recipe_ordinal["not"] = NOT; :(before "End Primitive Recipe Checks") case NOT: { if (SIZE(inst.products) > SIZE(inst.ingredients)) { - raise << Recipe[r].name << ": 'not' cannot have fewer ingredients than products in '" << inst.to_string() << "'\n" << end(); + raise << maybe(Recipe[r].name) << "'not' cannot have fewer ingredients than products in '" << inst.to_string() << "'\n" << end(); break; } for (long long int i = 0; i < SIZE(inst.ingredients); ++i) { if (!is_mu_scalar(inst.ingredients.at(i))) { - raise << Recipe[r].name << ": 'not' requires boolean ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end(); + raise << maybe(Recipe[r].name) << "'not' requires boolean ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end(); goto finish_checking_instruction; } } |