goatslacker / alt

Isomorphic flux implementation
http://alt.js.org/
3.45k stars 322 forks source link

Error displaying when dispatching #688

Closed bsdo64 closed 7 years ago

bsdo64 commented 7 years ago

How about displaying errors when dispatching?

Using some third party libs, errors are not be displayed. When I have any javascript code error, alt just throw error nothing displayed.

In here, https://github.com/goatslacker/alt/blob/f4c1bff38c57c30bd7bd96ea9d5fc93c4fb22b13/src/store/AltStore.js#L25

bsdo64 commented 7 years ago

Sorry, I didn't know listening error event.

Just add some doc error. Error handler property is

this.on('error', ({error, payload, state}) => {

});

In doc, http://alt.js.org/docs/lifecycleListeners#Error