Quellcode durchsuchen

Changes the implementation of reportError to callstats to create Error object if the error parameter is null.

dev1
hristoterezov vor 9 Jahren
Ursprung
Commit
80d69ec992
1 geänderte Dateien mit 2 neuen und 8 gelöschten Zeilen
  1. 2
    8
      modules/statistics/CallStats.js

+ 2
- 8
modules/statistics/CallStats.js Datei anzeigen

241
  * @private
241
  * @private
242
  */
242
  */
243
 CallStats._reportEvent = function (event) {
243
 CallStats._reportEvent = function (event) {
244
-    if(!event) {
245
-        logger.warn("No event is passed!");
246
-        return;
247
-    }
248
     if (callStats) {
244
     if (callStats) {
249
         callStats.sendFabricEvent(this.peerconnection, event, this.confID);
245
         callStats.sendFabricEvent(this.peerconnection, event, this.confID);
250
     } else {
246
     } else {
306
  * @private
302
  * @private
307
  */
303
  */
308
 CallStats._reportError = function (type, e, pc) {
304
 CallStats._reportError = function (type, e, pc) {
309
-    if(!e) {//nothing to report
310
-        logger.warn("No error is passed!");
311
-        return;
305
+    if(!e) {
306
+        e = new Error("Unknown error");
312
     }
307
     }
313
-
314
     if (callStats) {
308
     if (callStats) {
315
         callStats.reportError(pc, this.confID, type, e);
309
         callStats.reportError(pc, this.confID, type, e);
316
     } else {
310
     } else {

Laden…
Abbrechen
Speichern