Convert a PMTiles metadata decompression failure into an error response (#4399)
Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# Changelog MapLibre Native for Android
|
||||
|
||||
## main
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Convert a PMTiles metadata decompression failure into an error response instead of an uncaught exception ([#4399](https://github.com/maplibre/maplibre-native/pull/4399)).
|
||||
|
||||
## 13.3.1
|
||||
|
||||
### ✨ Features and improvements
|
||||
|
||||
@@ -450,7 +450,14 @@ private:
|
||||
std::string data = *responseMetadata.data;
|
||||
|
||||
if (header.internal_compression == pmtiles::COMPRESSION_GZIP) {
|
||||
data = util::decompress(data);
|
||||
try {
|
||||
data = util::decompress(data);
|
||||
} catch (const std::exception& e) {
|
||||
callback(std::make_unique<Response::Error>(
|
||||
Response::Error::Reason::Other,
|
||||
std::string("Error decompressing PMTiles metadata: ") + e.what()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
parse_callback(data);
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
MapLibre welcomes participation and contributions from everyone. Please read [`MapLibre iOS Developer Guide`](https://maplibre.org/maplibre-native/docs/book/ios/index.html) to get started.
|
||||
|
||||
## main
|
||||
|
||||
- Convert a PMTiles metadata decompression failure into an error response instead of an uncaught exception ([#4399](https://github.com/maplibre/maplibre-native/pull/4399)).
|
||||
|
||||
## 6.27.0
|
||||
|
||||
- Implement ambient cache for PMTiles sources ([#4290](https://github.com/maplibre/maplibre-native/pull/4290)).
|
||||
|
||||
Reference in New Issue
Block a user