summaryrefslogtreecommitdiffstats
path: root/mailnews/base/prefs/content/accountcreation/fetchhttp.js
diff options
context:
space:
mode:
Diffstat (limited to 'mailnews/base/prefs/content/accountcreation/fetchhttp.js')
-rw-r--r--mailnews/base/prefs/content/accountcreation/fetchhttp.js15
1 files changed, 6 insertions, 9 deletions
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;
}
}