diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2017-03-27 17:54:46 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-04-01 12:57:06 +0300 |
commit | 939864cb901fa35c41e7a04e93988cf746e921a6 (patch) | |
tree | a29ce2e0046d2f3ad7323ab86194d986fb77f14a /src/mbgl/util | |
parent | 1a9bccbb850c637583c18e7409e3b87a0dd9ff79 (diff) | |
download | qtlocation-mapboxgl-939864cb901fa35c41e7a04e93988cf746e921a6.tar.gz |
[core] Do not throw on dtors
Fix build on GCC6 + Ubuntu 16.04.
Diffstat (limited to 'src/mbgl/util')
-rw-r--r-- | src/mbgl/util/thread_local.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mbgl/util/thread_local.hpp b/src/mbgl/util/thread_local.hpp index 67e3842ec6..e6afc599ca 100644 --- a/src/mbgl/util/thread_local.hpp +++ b/src/mbgl/util/thread_local.hpp @@ -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); } } |