suborbital / reactr

Function scheduler for Go & WebAssembly
Apache License 2.0
289 stars 28 forks source link

Tweak how wasm runnable errors are handled #201

Closed cohix closed 2 years ago

cohix commented 2 years ago

History: In order to support AssemblyScript's 'abort' handlers, Reactr's handling of Wasm Call errors was updated to take the result of the abort handler over the error from the Wasm runtime... but the consequence of that is when a runtime error happens but no abort handler is there to return a better error (such as in every other language...), the Call error gets clobbered.

This PR fixes that. It'll still prefer the nicer error returned by a registered abort handler, but if none exists, it'll fall back to the error from Call.