Skip to content

Commit

Permalink
Made comment on image blob loading error handling clearer.
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyboardSounds committed May 3, 2019
1 parent 7a4b700 commit 5a8d583
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Core/Resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,8 @@ define([
window.URL.revokeObjectURL(generatedBlobResource.url);
}

// We attach additional information to the error here so that it can be handled by an ImageProvider.
// If the blob load succeeded but the image decode failed, provide access to the blob on the error object because it may provide useful insight.
// In particular, BingMapsImageryProvider uses this to detect the zero-length "image" that some map styles return when a real tile is not available.
error.blob = generatedBlob;

return when.reject(error);
Expand Down

0 comments on commit 5a8d583

Please sign in to comment.