-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model error handling #3259
Model error handling #3259
Conversation
@@ -347,6 +347,8 @@ define([ | |||
this._releaseGltfJson = defaultValue(options.releaseGltfJson, false); | |||
this._animationIds = undefined; | |||
|
|||
this._readyPromise = when.defer(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For cohension, can we move this._ready = false;
above or below this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean cohesion.
This is good, just that tweak if you agree. |
I ended up adding an optional Is this the right approach? |
I think this is fine. @mramato do you agree? Add reference doc (to the constructor function and |
Do we want it to be public? |
I think so. Why not? Sounds like there are valid use cases to provide this to the constructor function instead of assigning it construction. |
I decided not to add the |
This is ready for review. |
Can you please also cherry pick the commits to Model.js and tests for a pull request into master? |
Looks good. |
For #3177
Related to comments in #3239
Tests for:
throw new RuntimeError('Unsupported glTF Extension: ' + extension);
throw new DeveloperError('bgltf is not a valid Binary glTF file.');
throw new DeveloperError('Only Binary glTF version 1 is supported. Version ' + version + ' is not.');
I added a ready promise reject test for the invalid extension spec, but the other ones throw errors in the constructor which makes it hard to reject the ready promise.