Skip to content

0.9.0 – Exception handling in foreign procedures

Compare
Choose a tag to compare
@liquidev liquidev released this 11 Dec 21:18
· 60 commits to master since this release

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]