[core] Fix bugprone-exception-escape errors

As reported by clang-tidy-8.
This commit is contained in:
Thiago Marcos P. Santos
2020-03-27 18:30:35 +02:00
parent 0f235ac6d5
commit ea19e817c0
2 changed files with 10 additions and 2 deletions

View File

@@ -29,6 +29,7 @@
#include <mbgl/style/style.hpp>
#include <mbgl/util/async_request.hpp>
#include <mbgl/util/exception.hpp>
#include <mbgl/util/logging.hpp>
#include <mbgl/util/premultiply.hpp>
#include <unistd.h>
@@ -1428,7 +1429,11 @@ NodeMap::NodeMap(v8::Local<v8::Object> options)
}
NodeMap::~NodeMap() {
if (map) release();
try {
if (map) release();
} catch (...) {
mbgl::Log::Error(mbgl::Event::General, "Error release the map object when destroying NodeMap");
}
}
std::unique_ptr<mbgl::AsyncRequest> NodeFileSource::request(const mbgl::Resource& resource, mbgl::FileSource::Callback callback_) {