Bug 1350887 - Propagate errors thrown when starting server.TCPListener; r=whimboo draft
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 28 Mar 2017 16:48:20 +0100
changeset 556069 4a604a224db9e4106f6da1e898f33195c6fc82d2
parent 556068 f7b7752a227dadbfe91990a79c71b1da4d9e0311
child 556070 eebaa080da264b27ab73af7456e95e560303f6d6
push id52427
push userbmo:ato@mozilla.com
push dateWed, 05 Apr 2017 09:39:48 +0000
reviewerswhimboo
bugs1350887
milestone55.0a1
Bug 1350887 - Propagate errors thrown when starting server.TCPListener; r=whimboo Errors thrown are printed to console and there is no point in having a custom catch to print it. This also makes it possible to start Marionette programmatically without worrying about disappearing errors. MozReview-Commit-ID: GGhyCyYqJg
testing/marionette/components/marionette.js
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -292,19 +292,16 @@ MarionetteComponent.prototype.init = fun
   }
 
   let s;
   try {
     Cu.import("chrome://marionette/content/server.js");
     s = new server.TCPListener(prefs.port, prefs.forceLocal);
     s.start();
     this.logger.info(`Listening on port ${s.port}`);
-  } catch (e) {
-    this.logger.error(`Error on starting server: ${e}`);
-    dump(`${e.toString()}\n${e.stack}\n`);
   } finally {
     if (s) {
       this.server = s;
       this.running = true;
     }
   }
 };