binaryen.ml icon indicating copy to clipboard operation
binaryen.ml copied to clipboard

feat: Add bindings for exception handling (try/catch/throw/rethrow)

Open peblair opened this issue 1 year ago • 1 comments

Closes #189 .

One note about this API: the Binaryen constructor for try accepts either a list of catch expressions or a delegate tag. Keeping in line with the other bindings, we expose this API through Binaryen.Try.make, but we additionally define Binaryen.Try_Catch.make and Binaryen.Try_Delegate.make expressions which are more safe to use (since users don't need to worry about passing None to Try.make)

peblair avatar Oct 15 '23 21:10 peblair

@ospencer Good call. Fixed 👍

peblair avatar Oct 16 '23 07:10 peblair