Add error messages when external library loading fails.
This commit is contained in:
parent
a5f4d41455
commit
722e8db2e9
@ -50,6 +50,7 @@ export class Importer3dm extends ImporterBase
|
|||||||
onFinish ();
|
onFinish ();
|
||||||
});
|
});
|
||||||
}).catch (() => {
|
}).catch (() => {
|
||||||
|
this.SetError ('Failed to load rhino3dm.');
|
||||||
onFinish ();
|
onFinish ();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -285,7 +285,7 @@ class GltfExtensions
|
|||||||
callbacks.onSuccess ();
|
callbacks.onSuccess ();
|
||||||
});
|
});
|
||||||
}).catch (() => {
|
}).catch (() => {
|
||||||
callbacks.onError ();
|
callbacks.onError ('Failed to load draco decoder.');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
callbacks.onSuccess ();
|
callbacks.onSuccess ();
|
||||||
@ -616,8 +616,8 @@ export class ImporterGltf extends ImporterBase
|
|||||||
this.ImportModel (gltf);
|
this.ImportModel (gltf);
|
||||||
onFinish ();
|
onFinish ();
|
||||||
},
|
},
|
||||||
onError : () => {
|
onError : (message) => {
|
||||||
this.SetError ('Failed to load draco decoder.');
|
this.SetError (message);
|
||||||
onFinish ();
|
onFinish ();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -51,6 +51,7 @@ export class ImporterIfc extends ImporterBase
|
|||||||
onFinish ();
|
onFinish ();
|
||||||
});
|
});
|
||||||
}).catch (() => {
|
}).catch (() => {
|
||||||
|
this.SetError ('Failed to load web-ifc.');
|
||||||
onFinish ();
|
onFinish ();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -74,6 +74,7 @@ export class ImporterThreeBase extends ImporterBase
|
|||||||
LoadLibraries (libraries, () => {
|
LoadLibraries (libraries, () => {
|
||||||
this.LoadModel (fileContent, onFinish);
|
this.LoadModel (fileContent, onFinish);
|
||||||
}, () => {
|
}, () => {
|
||||||
|
this.SetError ('Failed to load three.js loader.');
|
||||||
onFinish ();
|
onFinish ();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user