Skip to content

Commit d7fa6e6

Browse files
authored
Merge pull request #303 from Esri/Ting/Fix-CancelationError
[Fix] Handle cancellation error in Identify raster
2 parents fc11595 + 1dabe88 commit d7fa6e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Shared/Samples/Identify raster cell/IdentifyRasterCellView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ private extension IdentifyRasterCellView {
113113
// Get the first raster cell from the identify result.
114114
let rasterCell = identifyResult.geoElements.first(where: { $0 is RasterCell })
115115
return rasterCell as? RasterCell
116+
} catch is CancellationError {
117+
// Does nothing if the error is a cancellation error.
118+
return nil
116119
} catch {
117120
self.error = error
118121
return nil

0 commit comments

Comments
 (0)