Skip to content

Commit

Permalink
Add error if not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar Shehata committed Aug 31, 2018
1 parent 90ee7cf commit d4c90e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -1247,13 +1247,21 @@ define([
*
* @memberof Cesium3DTileset.prototype
*
* @exception {DeveloperError} The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.
*
* @type {*}
* @readonly
*
* @see {@link https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification#specifying-extensions-and-application-specific-extras|Extras in the 3D Tiles specification.}
*/
extras : {
get : function() {
//>>includeStart('debug', pragmas.debug);
if (!this.ready) {
throw new DeveloperError('The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.');
}
//>>includeEnd('debug');

return this._extras;
}
}
Expand Down

0 comments on commit d4c90e3

Please sign in to comment.