New helper function for abort_fiber + message

This commit is contained in:
King_DuckZ 2022-05-25 11:56:13 +02:00
commit 616381516b
3 changed files with 12 additions and 7 deletions

View file

@ -89,4 +89,9 @@ namespace wren {
vm.ensure_slots(1);
variable(vm, handle, slot);
}
void abort_fiber_with_error (VM& vm, int slot, std::string_view message) {
set(vm, slot, message);
vm.abort_fiber(slot);
}
} //namespace wren