forked from Mirror/wren
- Add Fiber.transferError(_). - Primitives place runtime errors directly in the fiber instead of on the stack. - Primitives that change fibers set it directly in the VM. - Allow a fiber's error to be any object (except null).
10 lines
246 B
Plaintext
10 lines
246 B
Plaintext
var fiber = Fiber.new {
|
|
Fiber.abort(null)
|
|
System.print("get here") // expect: get here
|
|
Fiber.yield("value")
|
|
}
|
|
|
|
System.print(fiber.try()) // expect: value
|
|
System.print(fiber.isDone) // expect: false
|
|
System.print(fiber.error) // expect: null
|