Kaynağa Gözat

Throw WebGL errors in Session._update()

customisations
alemart 1 yıl önce
ebeveyn
işleme
c970283fe5
1 değiştirilmiş dosya ile 7 ekleme ve 3 silme
  1. 7
    3
      src/core/session.ts

+ 7
- 3
src/core/session.ts Dosyayı Görüntüle

@@ -520,9 +520,13 @@ export class Session extends AREventTarget<SessionEventType>
520 520
                 // update internals
521 521
                 this._updateStats.update();
522 522
                 this._frameReady = true;
523
-            }).catch(err => {
524
-                // handle error
525
-                Utils.warning('Tracking error: ' + err.toString());
523
+            }).catch((err: any) => {
524
+                // log error
525
+                Utils.error('Tracking error: ' + err.toString(), err);
526
+
527
+                // throw WebGL errors
528
+                if(err.name == 'GLError' || (typeof err.cause == 'object' && err.cause.name == 'GLError'))
529
+                    throw err;
526 530
             });
527 531
         }
528 532
         else {

Loading…
İptal
Kaydet