Selaa lähdekoodia

Handle errors

Popov72 5 vuotta sitten
vanhempi
commit
ffe8bc51f7
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      src/Loading/sceneLoader.ts

+ 2 - 0
src/Loading/sceneLoader.ts

@@ -420,6 +420,8 @@ export class SceneLoader {
             if (plugin.directLoad) {
                 plugin.directLoad(scene, directLoad).then((data) => {
                     onSuccess(plugin, data);
+                }).catch((error) => {
+                    onError("Error in directLoad of _loadData: " + error, error);
                 });
             } else {
                 onSuccess(plugin, directLoad);