diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-11-04 12:57:50 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-11-04 12:57:50 +0100 |
commit | 1468ff13e338bec04b466cb95a28816a3852e487 (patch) | |
tree | 460d382c698b8e3078e88e82057fa1102478b80a | |
parent | 1e2709266902c59bfdf1f708b20cb2e18d1d3b90 (diff) | |
download | qtlocation-mapboxgl-1468ff13e338bec04b466cb95a28816a3852e487.tar.gz |
[core] catch compression/decompression errors and report them
-rw-r--r-- | platform/default/sqlite_cache.cpp | 5 |
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()); } } |