Pass catched exceptions, fix error in addMessage
parent
fda15026d6
commit
4b52453e47
|
@ -148,7 +148,7 @@ Syncer.runFetch = function*(what, params, boxId, processor)
|
|||
var cb, wait;
|
||||
f.on('message', function(msg, seqnum)
|
||||
{
|
||||
gen.run(self.onMessage(msg, seqnum, boxId, processor), checkFinish, checkFinish);
|
||||
gen.run(self.onMessage(msg, seqnum, boxId, processor), checkFinish, function(e) { checkFinish(); throw e; });
|
||||
});
|
||||
|
||||
cb = gen.cb();
|
||||
|
@ -158,7 +158,7 @@ Syncer.runFetch = function*(what, params, boxId, processor)
|
|||
if (self.parsed <= 0)
|
||||
cb();
|
||||
else if (self.pending.length > 0)
|
||||
gen.run(self[processor](self.pending, boxId), saveLast, saveLast);
|
||||
gen.run(self[processor](self.pending, boxId), saveLast, function(e) { saveLast(); throw e; });
|
||||
});
|
||||
|
||||
function saveLast()
|
||||
|
@ -280,6 +280,7 @@ Syncer.saveMessages = function*(messages, boxId)
|
|||
|
||||
Syncer.addMessage = function*(msgrow, attrs)
|
||||
{
|
||||
var self = this;
|
||||
var pgtx, end_transaction;
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue