about summary refs log tree commit diff stats
path: root/070display.cc
diff options
context:
space:
mode:
Diffstat (limited to '070display.cc')
-rw-r--r--070display.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/070display.cc b/070display.cc
index 8c02bc57..1f42e5ba 100644
--- a/070display.cc
+++ b/070display.cc
@@ -83,18 +83,18 @@ case PRINT_CHARACTER_TO_DISPLAY: {
   long long int height = (h >= 0) ? h : 0;
   long long int width = (w >= 0) ? w : 0;
   if (ingredients.empty()) {
-    raise << current_recipe_name() << ": 'print-character-to-display' requires at least one ingredient, but got " << current_instruction().to_string() << '\n' << end();
+    raise << maybe(current_recipe_name()) << "'print-character-to-display' requires at least one ingredient, but got " << current_instruction().to_string() << '\n' << end();
     break;
   }
   if (!scalar(ingredients.at(0))) {
-    raise << current_recipe_name() << ": first ingredient of 'print-character-to-display' should be a character, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end();
+    raise << maybe(current_recipe_name()) << "first ingredient of 'print-character-to-display' should be a character, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end();
     break;
   }
   long long int c = ingredients.at(0).at(0);
   int color = TB_BLACK;
   if (SIZE(ingredients) > 1) {
     if (!scalar(ingredients.at(1))) {
-      raise << current_recipe_name() << ": second ingredient of 'print-character-to-display' should be a foreground color number, but got " << current_instruction().ingredients.at(1).original_string << '\n' << end();
+      raise << maybe(current_recipe_name()) << "second ingredient of 'print-character-to-display' should be a foreground color number, but got " << current_instruction().ingredients.at(1).original_string << '\n' << end();
       break;
     }
     color = ingredients.at(1).at(0);
@@ -102,7 +102,7 @@ case PRINT_CHARACTER_TO_DISPLAY: {
   int bg_color = TB_BLACK;
   if (SIZE(ingredients) > 2) {
     if (!scalar(ingredients.at(2))) {
-      raise << current_recipe_name() << ": third ingredient of 'print-character-to-display' should be a background color number, but got " << current_instruction().ingredients.at(2).original_string << '\n' << end();
+      raise << maybe(current_recipe_name()) << "third ingredient of 'print-character-to-display' should be a background color number, but got " << current_instruction().ingredients.at(2).original_string << '\n' << end();
       break;
     }
     bg_color = ingredients.at(2).at(0);
@@ -154,16 +154,16 @@ Recipe_ordinal["move-cursor-on-display"] = MOVE_CURSOR_ON_DISPLAY;
 :(before "End Primitive Recipe Implementations")
 case MOVE_CURSOR_ON_DISPLAY: {
   if (SIZE(ingredients) != 2) {
-    raise << current_recipe_name() << ": 'move-cursor-on-display' requires two ingredients, but got " << current_instruction().to_string() << '\n' << end();
+    raise << maybe(current_recipe_name()) << "'move-cursor-on-display' requires two ingredients, but got " << current_instruction().to_string() << '\n' << end();
     break;
   }
   if (!scalar(ingredients.at(0))) {
-    raise << current_recipe_name() << ": first ingredient of 'move-cursor-on-display' should be a row number, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end();
+    raise << maybe(current_recipe_name()) << "first ingredient of 'move-cursor-on-display' should be a row number, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end();
     break;
   }
   Display_row = ingredients.at(0).at(0);
   if (!scalar(ingredients.at(1))) {
-    raise << current_recipe_name() << ": second ingredient of 'move-cursor-on-display' should be a column number, but got " << current_instruction().ingredients.at(1).original_string << '\n' << end();
+    raise << maybe(current_recipe_name()) << "second ingredient of 'move-cursor-on-display' should be a column number, but got " << current_instruction().ingredients.at(1).original_string << '\n' << end();
     break;
   }
   Display_column = ingredients.at(1).at(0);