How to catch errors for all store subscriptions?
negebauer opened this issue · comments
Nicolás Gebauer commented
Hi!
How can I react to an error throw inside any subscription the store?
For example if I have
store.on('key').subscribe(() => {
throw new Error('foo')
})
How could I capture that error? (not inside the subscribe code, but in general for the whole store)
Boris Cherny commented
There is no way to do this generically. You could wrap your code in a try/catch if you like.