derbyjs / racer

Realtime model synchronization engine for Node.js
1.18k stars 117 forks source link

Exception in a model event subscription causes subscriptions break #244

Closed balek closed 3 months ago

balek commented 8 years ago

If a callback for a mutation event throws an exception, all other mutation event callbacks stops working. That's because all future events go to the model.root._mutatorEventQueue, which wouldn't be handled: https://github.com/derbyjs/racer/blob/master/lib/Model/events.js#L85-L100 I propose to wrap all callbacks with a try/catch block here: https://github.com/derbyjs/racer/blob/master/lib/Model/events.js#L252 like it's done here: https://github.com/derbyjs/racer/blob/master/lib/Model/events.js#L42-L46

craigbeck commented 3 months ago

Thanks for your contributing your issue.

We have recently been actively updating the Derby and Racer packages, and both repos are now in Typescript and published with types on npm. As we have quite a few old issues open we have made the decision to close out of date issues.

If this issue still matters to you we encourage reproducing against the current versions of the repo and opening a new issue.