From 5f98a10cc78829a03c9fa5a137392e7d5e9030ac Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 6 Oct 2015 22:15:45 -0700 Subject: 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. --- 064random.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '064random.cc') diff --git a/064random.cc b/064random.cc index de304714..12e1b848 100644 --- a/064random.cc +++ b/064random.cc @@ -36,11 +36,11 @@ Recipe_ordinal["round"] = ROUND; :(before "End Primitive Recipe Checks") case ROUND: { if (SIZE(inst.ingredients) != 1) { - raise << maybe(Recipe[r].name) << "'round' requires exactly one ingredient, but got " << inst.to_string() << '\n' << end(); + raise_error << maybe(Recipe[r].name) << "'round' requires exactly one ingredient, but got " << inst.to_string() << '\n' << end(); break; } - if (!is_mu_scalar(inst.ingredients.at(0))) { - raise << maybe(Recipe[r].name) << "first ingredient of 'round' should be a number, but got " << inst.ingredients.at(0).original_string << '\n' << end(); + if (!is_mu_number(inst.ingredients.at(0))) { + raise_error << maybe(Recipe[r].name) << "first ingredient of 'round' should be a number, but got " << inst.ingredients.at(0).original_string << '\n' << end(); break; } break; -- cgit 1.4.1-2-gfad0