cburschka / cadence

A strophe.js-powered XMPP web client for chatrooms.
6 stars 2 forks source link

Properly handle event errors. #430

Closed cburschka closed 7 years ago

cburschka commented 7 years ago

This was planned in #391:

These last two patches have finally added some exception handling to cadence.

Once they get introduced to the xmpp code as well (and specifically the event handlers), the client will no longer "crash" and we will finally (finally) have fixed the legendary #163 bug.

So this is where that happens.

cburschka commented 7 years ago

Since the handlers don't contain any asynchronous code, this shouldn't be much harder than wrapping them all in a try-catch block, sending errrors to Cadence.handleError() and returning true to strophe.

cburschka commented 7 years ago

Not only works like a charm, but also uncovered an error in the eventMessageError function that would have resulted in a silent #163 until now.