[core] Do not throw on dtors

Fix build on GCC6 + Ubuntu 16.04.
This commit is contained in:
Thiago Marcos P. Santos
2017-03-27 17:54:46 +03:00
committed by Thiago Marcos P. Santos
parent 1a9bccbb85
commit 939864cb90
2 changed files with 5 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ public:
const int error = sqlite3_close(db);
if (error != SQLITE_OK) {
throw Exception { error, sqlite3_errmsg(db) };
mbgl::Log::Error(mbgl::Event::Database, "%s (Code %i)", sqlite3_errmsg(db), error);
}
}

View File

@@ -1,7 +1,9 @@
#pragma once
#include <mbgl/util/logging.hpp>
#include <mbgl/util/noncopyable.hpp>
#include <cassert>
#include <stdexcept>
#include <pthread.h>
@@ -29,7 +31,8 @@ public:
~ThreadLocal() {
if (pthread_key_delete(key)) {
throw std::runtime_error("Failed to delete local storage key.");
Log::Error(Event::General, "Failed to delete local storage key.");
assert(false);
}
}