mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user