haxetink / tink_state

Handle those pesky states.
The Unlicense
29 stars 13 forks source link

Exception catching mode #77

Open gene-pavlovsky opened 2 years ago

gene-pavlovsky commented 2 years ago

The issue is the same as in the tink_core ticket: https://github.com/haxetink/tink_core/issues/165 Or will adding an exception catching mode to tink_core also fulfill the same purpose for tink_state?

I made a small test program which checks how it works with both signals and observables. The results are more scary than I thought. If any signal handler / observable binding throws an exception, not only this prevents other handlers / bindings from being called with the current signal / state change, but none of the handlers/bindings ever run again on further signals / state changes.

exception-test.tar.gz

gene-pavlovsky commented 9 months ago

I reckon this kind of solution should fix the observables issue as well: https://github.com/haxetink/tink_core/pull/175