-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Re-throw runtime errors when failing to parse 3D Tiles content. #6088
Conversation
@bagnell, thanks for the pull request! Maintainers, we have a signed CLA from @bagnell, so you can review this at any time.
I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
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.
Seems to work well. I edited a b3dm to be version 2 and got the error as expected.
Make sure to add a test. There are already tests that check for parsing errors but all of them are on the *Content
level rather than the tileset level.
Source/Scene/Cesium3DTileset.js
Outdated
}).otherwise(removeFunction); | ||
}).otherwise(function(error) { | ||
removeFunction(); | ||
if (error instanceof RuntimeError) { |
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.
Also look for DeveloperError
.
Fixes #5158. If it's not too much trouble could you also implement a |
@lilleyse Updated and added a test. Instead of throwing the error, an event is raised with the url and message. If there are no listeners, it logs the error to the console. |
CHANGES.md
Outdated
@@ -9,6 +9,7 @@ Change Log | |||
* Improved CZML Custom Properties sandcastle example [#6086](https://github.com/AnalyticalGraphicsInc/cesium/pull/6086) | |||
* Added `Plane.projectPointOntoPlane` for projecting a `Cartesian3` position onto a `Plane` [#6092](https://github.com/AnalyticalGraphicsInc/cesium/pull/6092) | |||
* Added `Cartesian3.vectorProjection` for projecting one vector to another [#6093](https://github.com/AnalyticalGraphicsInc/cesium/pull/6093) | |||
* Added `Cesium3DTileset.tileFailed` event that will be raised when a tile fails to load. The object passed to the event listener will have a url and message property. [#6088](https://github.com/AnalyticalGraphicsInc/cesium/pull/6088) |
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.
Mention that if there are no listeners failed tile error messages will be logged to the console.
Besides that |
@lilleyse Updated. Also updated the event doc. |
Re-throws a
RuntimeError
inCesium3DTileset
when parsing content fails. Errors like 404s are still ignored.