[node] Update changes in MapObserver::onDidFailLoadingMap
This commit is contained in:
@@ -42,8 +42,8 @@ static const char* releasedMessage() {
|
||||
NodeBackend::NodeBackend()
|
||||
: HeadlessBackend(sharedDisplay()) {}
|
||||
|
||||
void NodeBackend::onDidFailLoadingMap() {
|
||||
throw std::runtime_error("Requires a map style to be a valid style JSON");
|
||||
void NodeBackend::onDidFailLoadingMap(std::exception_ptr error) {
|
||||
std::rethrow_exception(error);
|
||||
}
|
||||
|
||||
void NodeMap::Init(v8::Local<v8::Object> target) {
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <mbgl/gl/headless_backend.hpp>
|
||||
#include <mbgl/gl/offscreen_view.hpp>
|
||||
|
||||
#include <exception>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
@@ -18,7 +20,7 @@ namespace node_mbgl {
|
||||
class NodeBackend : public mbgl::HeadlessBackend {
|
||||
public:
|
||||
NodeBackend();
|
||||
void onDidFailLoadingMap() final;
|
||||
void onDidFailLoadingMap(std::exception_ptr) final;
|
||||
};
|
||||
|
||||
class NodeMap : public Nan::ObjectWrap,
|
||||
|
||||
Reference in New Issue
Block a user