Add a `verb` string parameter to the `runFiber` helper function so that `Fiber.try()` produces consistent error messages like "Cannot try a finished fiber." instead of the previous generic fallback. Update all call sites (`fiber_call`, `fiber_call1`, `fiber_transfer`, `fiber_transfer1`) to pass the appropriate verb string, and add a new test case `try_error.wren` verifying the error message for trying an aborted fiber.
7 lines
142 B
Plaintext
7 lines
142 B
Plaintext
var fiber = Fiber.new {
|
|
System.print("try")
|
|
}
|
|
|
|
fiber.try() // expect: try
|
|
fiber.try() // expect runtime error: Cannot try a finished fiber.
|