Skip to content

Commit

Permalink
Merge pull request #1877 from AnalyticalGraphicsInc/otherwise
Browse files Browse the repository at this point in the history
Make sure CZML and GeoJSON errors propagate properly
  • Loading branch information
pjcozzi committed Jul 1, 2014
2 parents 17c2515 + 28670d3 commit bec4f77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Source/DynamicScene/CzmlDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ define([
return when(loadJson(url), function(czml) {
dataSource.process(czml, url);
setLoading(dataSource, false);
}, function(error) {
}).otherwise(function(error) {
setLoading(dataSource, false);
dataSource._error.raiseEvent(dataSource, error);
return when.reject(error);
Expand All @@ -1846,7 +1846,7 @@ define([
return when(loadJson(url), function(czml) {
dataSource.load(czml, url);
setLoading(dataSource, false);
}, function(error) {
}).otherwise(function(error) {
setLoading(dataSource, false);
dataSource._error.raiseEvent(dataSource, error);
return when.reject(error);
Expand Down
4 changes: 2 additions & 2 deletions Source/DynamicScene/GeoJsonDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ define([
var dataSource = this;
return when(loadJson(url), function(geoJson) {
return dataSource.load(geoJson, url);
}, function(error) {
}).otherwise(function(error) {
setLoading(dataSource, false);
dataSource._error.raiseEvent(dataSource, error);
return when.reject(error);
Expand Down Expand Up @@ -523,7 +523,7 @@ define([
typeHandler(dataSource, geoJson, geoJson, crsFunction, sourceUri);
dataSource._changed.raiseEvent(dataSource);
setLoading(dataSource, false);
}, function(error) {
}).otherwise(function(error) {
setLoading(dataSource, false);
dataSource._error.raiseEvent(dataSource, error);
return when.reject(error);
Expand Down

0 comments on commit bec4f77

Please sign in to comment.