Bug 976160 - Log exceptions from EventDispatcher.sendResponse and sendError instead of eating them. r=wesj
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 25 Feb 2014 08:19:41 -0500
changeset 170470 fad94053c6b0193cfc46c6e25970616dd75d7b28
parent 170469 ee23500859a47d389f125f073311a8f218d44eeb
child 170471 59b615846cf273277efc9434d5ba9705187d352c
push id26288
push userryanvm@gmail.com
push dateTue, 25 Feb 2014 20:20:43 +0000
treeherdermozilla-central@22650589a724 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs976160
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 976160 - Log exceptions from EventDispatcher.sendResponse and sendError instead of eating them. r=wesj
mobile/android/base/EventDispatcher.java
--- a/mobile/android/base/EventDispatcher.java
+++ b/mobile/android/base/EventDispatcher.java
@@ -101,18 +101,22 @@ public final class EventDispatcher {
         }
 
     }
 
     public static void sendResponse(JSONObject message, JSONObject response) {
         try {
             response.put(GUID, message.getString(GUID));
             GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent(message.getString("type") + ":Return", response.toString()));
-        } catch(Exception ex) { }
+        } catch (Exception ex) {
+            Log.e(LOGTAG, "Unable to send response", ex);
+        }
     }
 
     public static void sendError(JSONObject message, JSONObject error) {
         try {
             error.put(GUID, message.getString(GUID));
             GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent(message.getString("type") + ":Error", error.toString()));
-        } catch(Exception ex) { }
+        } catch (Exception ex) {
+            Log.e(LOGTAG, "Unable to send error", ex);
+        }
     }
 }