bug 520065 - partial sync fail should be an error, add better error string, and fix status object misuse so it actually works

This commit is contained in:
Mike Connor 2009-10-27 19:15:20 -04:00
parent 0254f70199
commit 51dd2f0b6c
2 changed files with 8 additions and 2 deletions

View File

@ -3,5 +3,10 @@ error.login.reason.passphrase = Wrong secret phrase
error.login.reason.password = Incorrect username or password
error.login.reason.server = Server incorrectly configured
error.sync.failed_partial = One or more data types could not be synced
invalid-captcha = Incorrect words, try again
weak-password = Use a stronger password
# this is the fallback, if we hit an error we didn't bother to localize
error.reason.unknown = Unknown error

View File

@ -1103,7 +1103,7 @@ WeaveSvc.prototype = {
}
if (this._syncError)
this._log.warn("Some engines did not sync correctly");
throw "Some engines did not sync correctly";
else {
Svc.Prefs.set("lastSync", new Date().toString());
Status.sync = SYNC_SUCCEEDED;
@ -1165,7 +1165,8 @@ WeaveSvc.prototype = {
this._checkServerError(e);
Status.engine = [engine.name, e.failureCode || ENGINE_UNKNOWN_FAIL];
Status.engines = [engine.name, e.failureCode || ENGINE_UNKNOWN_FAIL];
this._syncError = true;
this._log.debug(Utils.exceptionStr(e));
return true;