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

Added warning if parsing of custom settings fails

dosse91 9 лет назад
Родитель
Сommit
0808650b6b
2 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      speedtest_worker.js
  2. 0 0
      speedtest_worker.min.js

+ 1 - 1
speedtest_worker.js

@@ -111,7 +111,7 @@ this.addEventListener('message', function (e) {
       if (typeof s.time_ulGraceTime !== 'undefined') settings.time_ulGraceTime = s.time_ulGraceTime // ul test grace time before measuring
       if (typeof s.time_ulGraceTime !== 'undefined') settings.time_ulGraceTime = s.time_ulGraceTime // ul test grace time before measuring
       if (typeof s.overheadCompensationFactor !== 'undefined') settings.overheadCompensationFactor = s.overheadCompensationFactor //custom overhead compensation factor (default assumes HTTP+TCP+IP+ETH with typical MTUs)
       if (typeof s.overheadCompensationFactor !== 'undefined') settings.overheadCompensationFactor = s.overheadCompensationFactor //custom overhead compensation factor (default assumes HTTP+TCP+IP+ETH with typical MTUs)
       if (settings.allow_fetchAPI && settings.force_fetchAPI && (!!self.fetch)) useFetchAPI = true
       if (settings.allow_fetchAPI && settings.force_fetchAPI && (!!self.fetch)) useFetchAPI = true
-    } catch (e) { }
+    } catch (e) { console.warn("Possible error in custom test settings. Some settings may not be applied. Exception: "+e) }
     // run the tests
     // run the tests
     console.log(settings)
     console.log(settings)
     console.log('Fetch API: ' + useFetchAPI)
     console.log('Fetch API: ' + useFetchAPI)

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
speedtest_worker.min.js


Некоторые файлы не были показаны из-за большого количества измененных файлов