continue sync of other engines even after one of them throws an exception; use constructor name instead of instanceof to check for array object in modules

This commit is contained in:
Dan Mills 2008-05-23 23:58:53 -07:00
parent fe48398743
commit fd0eac8eb3
2 changed files with 7 additions and 4 deletions

View File

@ -510,8 +510,12 @@ WeaveSvc.prototype = {
},
_syncEngine: function WeaveSvc__syncEngine(engine) {
let self = yield;
engine.sync(self.cb);
yield;
try {
engine.sync(self.cb);
yield;
} catch(e) {
this._log.error(e.toString());
}
},
resetServer: function WeaveSync_resetServer(onComplete) {

View File

@ -109,8 +109,7 @@ let Utils = {
return thing;
let ret;
if (thing instanceof Array) {
dump("making a cipy of an array!\n\n");
if ("Array" == thing.constructor.name) {
ret = [];
for (let i = 0; i < thing.length; i++)
ret.push(Utils.deepCopy(thing[i]));