Bug 900080 - Use e.message instead of e in onPacket errors. r=wlach, a=test-only
authorJonathan Griffin <jgriffin@mozilla.com>
Wed, 31 Jul 2013 10:55:44 -0700
changeset 119828 ba71c64705e5dd14f90b4b7e133409213acd98ff
parent 119827 90b792959f01e9872af43898ace0dd1fbf3ffca4
child 119829 a2a9b89ef5ee008db097e57f24e401e1706b2746
push id1015
push userryanvm@gmail.com
push dateThu, 01 Aug 2013 16:41:14 +0000
reviewerswlach, test-only
bugs900080
milestone18.1
Bug 900080 - Use e.message instead of e in onPacket errors. r=wlach, a=test-only
testing/marionette/marionette-server.js
--- a/testing/marionette/marionette-server.js
+++ b/testing/marionette/marionette-server.js
@@ -162,17 +162,17 @@ MarionetteServerConnection.prototype = {
   onPacket: function MSC_onPacket(aPacket) {
     // Dispatch the request
     if (this.requestTypes && this.requestTypes[aPacket.type]) {
       try {
         this.requestTypes[aPacket.type].bind(this)(aPacket);
       } catch(e) {
         this.conn.send({ error: ("error occurred while processing '" +
                                  aPacket.type),
-                        message: e });
+                        message: e.message });
       }
     } else {
       this.conn.send({ error: "unrecognizedPacketType",
                        message: ('Marionette does not ' +
                                  'recognize the packet type "' +
                                  aPacket.type + '"') });
     }
   },