diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-11 00:39:20 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-11 00:39:20 -0500 |
commit | 14ef5645383a36383082b75a8495c5df53f18f26 (patch) | |
tree | 638b6dc3b99bd05f7013e9dba120bcdedf0db219 /mailnews/base/prefs/content | |
parent | 4fdd9dac67cdf3937b3de49f8d8ca361c2aded60 (diff) | |
download | UXP-14ef5645383a36383082b75a8495c5df53f18f26.tar UXP-14ef5645383a36383082b75a8495c5df53f18f26.tar.gz UXP-14ef5645383a36383082b75a8495c5df53f18f26.tar.lz UXP-14ef5645383a36383082b75a8495c5df53f18f26.tar.xz UXP-14ef5645383a36383082b75a8495c5df53f18f26.zip |
Tails 6156 - Fix outdated error handling in accountcreation and remove buggy debug code
Tag #1273
Diffstat (limited to 'mailnews/base/prefs/content')
3 files changed, 7 insertions, 12 deletions
diff --git a/mailnews/base/prefs/content/accountcreation/emailWizard.js b/mailnews/base/prefs/content/accountcreation/emailWizard.js index 51c2bf1f5..55ca8f93c 100644 --- a/mailnews/base/prefs/content/accountcreation/emailWizard.js +++ b/mailnews/base/prefs/content/accountcreation/emailWizard.js @@ -75,7 +75,7 @@ Things to test (works for me): former bug: goes to manual first shortly, then to result **********************/ -// To debug, set mail.wizard.logging.dump (or .console)="All" and kDebug = true +// To debug, set mail.wizard.logging.dump (or .console)="All" function e(elementID) { diff --git a/mailnews/base/prefs/content/accountcreation/fetchhttp.js b/mailnews/base/prefs/content/accountcreation/fetchhttp.js index 04f5272cd..d2323f7b6 100644 --- a/mailnews/base/prefs/content/accountcreation/fetchhttp.js +++ b/mailnews/base/prefs/content/accountcreation/fetchhttp.js @@ -159,17 +159,14 @@ FetchHTTP.prototype = else { success = false; - try - { - errorCode = this._request.status; - errorStr = this._request.statusText; - } catch (e) { - // If we can't resolve the hostname in DNS etc., .statusText throws - errorCode = -2; + errorCode = this._request.status; + if (errorCode == 0) { errorStr = getStringBundle( - "chrome://messenger/locale/accountCreationUtil.properties") - .GetStringFromName("cannot_contact_server.error"); + "chrome://messenger/locale/accountCreationUtil.properties") + .GetStringFromName("cannot_contact_server.error"); ddump(errorStr); + } else { + errorStr = this._request.statusText; } } diff --git a/mailnews/base/prefs/content/accountcreation/sanitizeDatatypes.js b/mailnews/base/prefs/content/accountcreation/sanitizeDatatypes.js index 0f95f78d1..3c927a1af 100644 --- a/mailnews/base/prefs/content/accountcreation/sanitizeDatatypes.js +++ b/mailnews/base/prefs/content/accountcreation/sanitizeDatatypes.js @@ -198,8 +198,6 @@ function MalformedException(msgID, uncheckedBadValue) var stringBundle = getStringBundle( "chrome://messenger/locale/accountCreationUtil.properties"); var msg = stringBundle.GetStringFromName(msgID); - if (kDebug) - msg += " (bad value: " + new String(uncheckedBadValue) + ")"; Exception.call(this, msg); } MalformedException.prototype = Object.create(Exception.prototype); |