Let exceptions from stream message callbacks percolate upwards.

We used to be unable to do this because of a SockJS bug, but the SockJS folks
read our XXX comment and fixed the bug!
https://github.com/sockjs/sockjs-client/issues/61
This commit is contained in:
David Glasser
2012-09-25 18:26:06 -07:00
parent a9dfc0322b
commit a016e83754

View File

@@ -327,16 +327,7 @@ _.extend(Meteor._Stream.prototype, {
self._connected(data.data);
else if (self.current_status.connected)
_.each(self.event_callbacks.message, function (callback) {
try {
callback(data.data);
} catch (e) {
// XXX sockjs catches and silently ignores any exceptions
// that we raise here. not sure what we should do, but for
// now, just print the exception so you are at least aware
// that something went wrong.
// XXX improve error message
Meteor._debug("Exception while processing message", e.stack);
}
callback(data.data);
});
self._heartbeat_received();