politie / sherlock

A reactive programming library for JavaScript applications, built with TypeScript.
Apache License 2.0
39 stars 12 forks source link

Add errorHandler to ReactorOptions #63

Closed pavadeli closed 6 years ago

pavadeli commented 6 years ago

Currently, errors that occur in derivations and reactors will throw on the Atom#set that "caused" the error. This is because of the synchronous nature of Sherlock.

It should be possible to set an error handler on reactors to prevent this behavior and to allow handling of errors without disrupting the rest of the application.

This is also needed to be able to reject Promises on any error, see issue #59.