Merge c6b43719c60602de4bed0cb3d40d43e67750b602 into 2daf84a6c10d22fcd4151fa9fcff9bea5407293a

This commit is contained in:
Mary M 2024-03-09 21:44:56 -07:00 committed by GitHub
commit 5457d82491
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -75,8 +75,13 @@ void handle(std::string message, int z, unsigned x, unsigned y, std::map<std::st
int features_added = 0;
bool was_compressed;
if (!tile.decode(message, was_compressed)) {
fprintf(stderr, "Couldn't decompress tile %d/%u/%u\n", z, x, y);
try {
if (!tile.decode(message, was_compressed)) {
fprintf(stderr, "Couldn't decompress tile %d/%u/%u\n", z, x, y);
exit(EXIT_FAILURE);
}
} catch (std::exception const &e) {
fprintf(stderr, "PBF decoding error in tile %d/%u/%u\n", z, x, y);
exit(EXIT_FAILURE);
}