diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-06 22:15:45 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-06 22:15:45 -0700 |
commit | 5f98a10cc78829a03c9fa5a137392e7d5e9030ac (patch) | |
tree | b88536e28f6d507c4b68b337423c0b6a4e28306c /023boolean.cc | |
parent | 75aa3a98e2b9311d65df91523ec754d5a2770456 (diff) | |
download | mu-5f98a10cc78829a03c9fa5a137392e7d5e9030ac.tar.gz |
2258 - separate warnings from errors
At the lowest level I'm reluctantly starting to see the need for errors that stop the program in its tracks. Only way to avoid memory corruption and security issues. But beyond that core I still want to be as lenient as possible at higher levels of abstraction.
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 24752e72..49683455 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 << maybe(Recipe[r].name) << "'and' requires boolean ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end(); + raise_error << 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 << maybe(Recipe[r].name) << "'and' requires boolean ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end(); + raise_error << 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 << maybe(Recipe[r].name) << "'not' cannot have fewer ingredients than products in '" << inst.to_string() << "'\n" << end(); + raise_error << 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 << maybe(Recipe[r].name) << "'not' requires boolean ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end(); + raise_error << maybe(Recipe[r].name) << "'not' requires boolean ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end(); goto finish_checking_instruction; } } |