mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.37k stars 1.33k forks source link

[core] Handle exception while queried feature is not included in a source. #16494

Closed Chaoba closed 4 years ago

Chaoba commented 4 years ago

Resolves https://github.com/mapbox/mapbox-gl-native-android/issues/121

If the queried feature is not included in the current source, an exception std::runtime_error("No cluster with the specified id.") will be thrown out which will then cause the app crash. This pr will catch this exception and then return an empty result.