0.9.0 – Exception handling in foreign procedures
This release introduces exception handling in foreign procedures. When an exception is caught, the current fiber is aborted. Example:
# say we have a proc that can raise an exception
proc errorTest() =
raise newException(Exception, "oops")
wren.foreign("example"):
Example:
errorTest
If we call the proc, we'll get a nice error message:
import "example" for Example
Example.errorTest()
Unhandled exception: oops [Exception]
wren stack trace:
at main(2) [WrenError]