Bug 1486885 - Remove error logging inside getBaseDomainFromURI(). r=Gijs
authorDennis Schubert <dschubert@mozilla.com>
Thu, 30 Aug 2018 15:50:20 +0000
changeset 482443 396e4cc1baef39466a97905f9b17356f8c9b5a20
parent 482442 57204974417c9b9feaba3c2306624f3dd5d57d12
child 482444 a35cbdf27bd1f79b1d756866d5a28b8e29f4c4f8
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewersGijs
bugs1486885
milestone63.0a1
Bug 1486885 - Remove error logging inside getBaseDomainFromURI(). r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D4684
browser/extensions/webcompat/content/lib/ua_overrider.jsm
mobile/android/extensions/webcompat/content/lib/ua_overrider.jsm
--- a/browser/extensions/webcompat/content/lib/ua_overrider.jsm
+++ b/browser/extensions/webcompat/content/lib/ua_overrider.jsm
@@ -83,18 +83,17 @@ class UAOverrider {
    *
    * However, the eTLDService is a bit picky and throws whenever we pass a
    * blank host name or an IP into it, see bug 1337785. Since we do not plan on
    * override UAs for such cases, we simply catch everything and return false.
    */
   getBaseDomainFromURI(uri) {
     try {
       return Services.eTLD.getBaseDomain(uri);
-    } catch (ex) {
-      console.error(`Could not getBaseDomain() for "${uri}"`, ex);
+    } catch (_) {
       return false;
     }
   }
 
   /**
    * This function returns a User Agent based on the URI passed into. All
    * override rules are defined in data/ua_overrides.jsm and the required format
    * is explained there.
--- a/mobile/android/extensions/webcompat/content/lib/ua_overrider.jsm
+++ b/mobile/android/extensions/webcompat/content/lib/ua_overrider.jsm
@@ -83,18 +83,17 @@ class UAOverrider {
    *
    * However, the eTLDService is a bit picky and throws whenever we pass a
    * blank host name or an IP into it, see bug 1337785. Since we do not plan on
    * override UAs for such cases, we simply catch everything and return false.
    */
   getBaseDomainFromURI(uri) {
     try {
       return Services.eTLD.getBaseDomain(uri);
-    } catch (ex) {
-      console.error(`Could not getBaseDomain() for "${uri}"`, ex);
+    } catch (_) {
       return false;
     }
   }
 
   /**
    * This function returns a User Agent based on the URI passed into. All
    * override rules are defined in data/ua_overrides.jsm and the required format
    * is explained there.