diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/common/tokenserverclient.js | 5 | ||||
-rw-r--r-- | services/crypto/modules/WeaveCrypto.js | 6 | ||||
-rw-r--r-- | services/sync/modules/status.js | 7 |
3 files changed, 3 insertions, 15 deletions
diff --git a/services/common/tokenserverclient.js b/services/common/tokenserverclient.js index b220ab586..ca40f7d93 100644 --- a/services/common/tokenserverclient.js +++ b/services/common/tokenserverclient.js @@ -149,10 +149,7 @@ TokenServerClientServerError.prototype._toStringFields = function() { */ this.TokenServerClient = function TokenServerClient() { this._log = Log.repository.getLogger("Common.TokenServerClient"); - let level = "Debug"; - try { - level = Services.prefs.getCharPref(PREF_LOG_LEVEL); - } catch (ex) {} + let level = Services.prefs.getCharPref(PREF_LOG_LEVEL, "Debug"); this._log.level = Log.Level[level]; } TokenServerClient.prototype = { diff --git a/services/crypto/modules/WeaveCrypto.js b/services/crypto/modules/WeaveCrypto.js index c040c4f6f..d0d5bdb18 100644 --- a/services/crypto/modules/WeaveCrypto.js +++ b/services/crypto/modules/WeaveCrypto.js @@ -51,11 +51,7 @@ WeaveCrypto.prototype = { this.prefBranch = Services.prefs.getBranch("services.sync.log."); this.prefBranch.addObserver("cryptoDebug", this.observer, false); this.observer._self = this; - try { - this.debug = this.prefBranch.getBoolPref("cryptoDebug"); - } catch (x) { - this.debug = false; - } + this.debug = this.prefBranch.getBoolPref("cryptoDebug", false); XPCOMUtils.defineLazyGetter(this, 'encoder', () => new TextEncoder(UTF_LABEL)); XPCOMUtils.defineLazyGetter(this, 'decoder', () => new TextDecoder(UTF_LABEL, { fatal: true })); }, diff --git a/services/sync/modules/status.js b/services/sync/modules/status.js index a5b8305b4..1233cbe14 100644 --- a/services/sync/modules/status.js +++ b/services/sync/modules/status.js @@ -125,12 +125,7 @@ this.Status = { resetSync: function resetSync() { // Logger setup. let logPref = PREFS_BRANCH + "log.logger.status"; - let logLevel = "Trace"; - try { - logLevel = Services.prefs.getCharPref(logPref); - } catch (ex) { - // Use default. - } + let logLevel = Services.prefs.getCharPref(logPref, "Trace"); this._log.level = Log.Level[logLevel]; this._log.info("Resetting Status."); |