Catch errors in Meteor.flush()

This commit is contained in:
David Greenspan
2012-09-16 04:23:19 -07:00
parent b11ec664e8
commit c96ee60132

View File

@@ -59,7 +59,11 @@
_.each(pending, function (ctx) {
_.each(ctx._callbacks, function (f) {
f(ctx); // XXX wrap in try?
try {
f(ctx);
} catch (e) {
Meteor._debug("Exception from Meteor.flush:", e);
}
});
delete ctx._callbacks; // maybe help the GC
});