You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
guide/async.md §3: onFlush(() => { saveError := "" }) erases an error thrown before the action's first await #52
Filed with Opus 5.5. I personally don't have the required understanding to know whether it's something worth fixing, but I had a stab at converting my web app to use reactivescript. Very excited for the development, so I'll continue to file (hopefully) useful issues, based on the migration efforts
Versions: spec, interpreter and runtime on main at 08255de (also 0.1.0).
guide/async.md §3 clears the old error at the top of the action with onFlush(() => { saveError := "" }) and writes the new error in the catch. If the body fails before its first await, the catch's write lands in the run's own instant. The onFlush run then follows and clears it. The interpreter agrees:
In the browser both instants land in one frame, so the user never sees the error. In our case the error was a synchronous throw from inside the runtime, and it vanished silently.
This follows from EF-8, so it isn't a runtime bug, but the guide presents the idiom as the general pattern. Options: add a caveat to the guide, or recommend a form that doesn't lose early failures. I haven't verified which form the maintainers would prefer, e.g. writing the error via onFlush in the catch as well.
Activity