summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-11-04 12:57:50 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-11-04 12:57:50 +0100
commit1468ff13e338bec04b466cb95a28816a3852e487 (patch)
tree460d382c698b8e3078e88e82057fa1102478b80a
parent1e2709266902c59bfdf1f708b20cb2e18d1d3b90 (diff)
downloadqtlocation-mapboxgl-1468ff13e338bec04b466cb95a28816a3852e487.tar.gz
[core] catch compression/decompression errors and report them
-rw-r--r--platform/default/sqlite_cache.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/default/sqlite_cache.cpp b/platform/default/sqlite_cache.cpp
index d8b79c8f9b..5dc1521680 100644
--- a/platform/default/sqlite_cache.cpp
+++ b/platform/default/sqlite_cache.cpp
@@ -133,6 +133,9 @@ void SQLiteCache::Impl::get(const Resource &resource, Callback callback) {
} catch (mapbox::sqlite::Exception& ex) {
Log::Error(Event::Database, ex.code, ex.what());
callback(nullptr);
+ } catch (std::runtime_error& ex) {
+ Log::Error(Event::Database, ex.what());
+ callback(nullptr);
}
}
@@ -200,6 +203,8 @@ void SQLiteCache::Impl::put(const Resource& resource, std::shared_ptr<const Resp
putStmt->run();
} catch (mapbox::sqlite::Exception& ex) {
Log::Error(Event::Database, ex.code, ex.what());
+ } catch (std::runtime_error& ex) {
+ Log::Error(Event::Database, ex.what());
}
}