diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-08-16 19:13:45 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-08-16 19:13:45 -0700 |
commit | 5db2faebe215e588172bcfe1810416f4c7b909b1 (patch) | |
tree | 996db049f328a428b9e5478d9f6d3203ec6fb8a7 /038scheduler.cc | |
parent | 221caac6150a60077f168002b37f6e1692dcc163 (diff) | |
download | mu-5db2faebe215e588172bcfe1810416f4c7b909b1.tar.gz |
2022 - run sandboxes in separate routines
Diffstat (limited to '038scheduler.cc')
-rw-r--r-- | 038scheduler.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/038scheduler.cc b/038scheduler.cc index d32fb76a..613491b5 100644 --- a/038scheduler.cc +++ b/038scheduler.cc @@ -130,6 +130,18 @@ START_RUNNING, Recipe_ordinal["start-running"] = START_RUNNING; :(before "End Primitive Recipe Implementations") case START_RUNNING: { + if (ingredients.empty()) { + raise << "'start-running' requires at least one ingredient: the recipe to start running\n" << end(); + break; + } + if (!scalar(ingredients.at(0))) { + raise << "first ingredient of 'start-running' should be a recipe, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); + break; + } + if (!ingredients.at(0).at(0)) { + raise << "'start-running' received non-existent recipe: '" << current_instruction().to_string() << "'\n" << end(); + break; + } routine* new_routine = new routine(ingredients.at(0).at(0)); new_routine->parent_index = Current_routine_index; // populate ingredients |