Просмотр исходного кода

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

dev1
hristoterezov 9 лет назад
Родитель
Сommit
80d69ec992
1 измененных файлов: 2 добавлений и 8 удалений
  1. 2
    8
      modules/statistics/CallStats.js

+ 2
- 8
modules/statistics/CallStats.js Просмотреть файл

@@ -241,10 +241,6 @@ CallStats.sendDominantSpeakerEvent = _try_catch(function (cs) {
241 241
  * @private
242 242
  */
243 243
 CallStats._reportEvent = function (event) {
244
-    if(!event) {
245
-        logger.warn("No event is passed!");
246
-        return;
247
-    }
248 244
     if (callStats) {
249 245
         callStats.sendFabricEvent(this.peerconnection, event, this.confID);
250 246
     } else {
@@ -306,11 +302,9 @@ function(overallFeedback, detailedFeedback) {
306 302
  * @private
307 303
  */
308 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 308
     if (callStats) {
315 309
         callStats.reportError(pc, this.confID, type, e);
316 310
     } else {

Загрузка…
Отмена
Сохранить