about summary refs log tree commit diff stats
path: root/064random.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-06 22:15:45 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-06 22:15:45 -0700
commit5f98a10cc78829a03c9fa5a137392e7d5e9030ac (patch)
treeb88536e28f6d507c4b68b337423c0b6a4e28306c /064random.cc
parent75aa3a98e2b9311d65df91523ec754d5a2770456 (diff)
downloadmu-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 '064random.cc')
-rw-r--r--064random.cc6
1 files changed, 3 insertions, 3 deletions
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;