Bug 1150052 - Report exceptions that occur in MozLoop object APIs directly to the console, so we'll be able to recognize errors better. r=Standard8, a=sledru
authorMike de Boer <mdeboer@mozilla.com>
Thu, 02 Apr 2015 15:28:45 +0200
changeset 258367 0299772271a8
parent 258366 a7535132fe8e
child 258368 32e9c40ea3f9
push id4654
push userryanvm@gmail.com
push date2015-04-08 19:02 +0000
treeherdermozilla-beta@01cf08a90d44 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, sledru
bugs1150052
milestone38.0
Bug 1150052 - Report exceptions that occur in MozLoop object APIs directly to the console, so we'll be able to recognize errors better. r=Standard8, a=sledru
browser/components/loop/MozLoopAPI.jsm
--- a/browser/components/loop/MozLoopAPI.jsm
+++ b/browser/components/loop/MozLoopAPI.jsm
@@ -160,16 +160,17 @@ const injectObjectAPI = function(api, ta
           }
           lastParam(...[cloneValueInto(r, targetWindow) for (r of results)]);
         });
       } else {
         try {
           lastParam = cloneValueInto(lastParam, api);
           return cloneValueInto(api[func](...params, lastParam), targetWindow);
         } catch (ex) {
+          MozLoopService.log.error(func + " error: ", ex, params, lastParam);
           return cloneValueInto(ex, targetWindow);
         }
       }
     };
   });
 
   let contentObj = Cu.cloneInto(injectedAPI, targetWindow, {cloneFunctions: true});
   // Since we deny preventExtensions on XrayWrappers, because Xray semantics make