Change error message with invalid render usage (#12265)

* Change error message with invalid render usage

This change disambiguates this error condition with a different error with the same error message at 789baf4c1f/src/mbgl/map/map.cpp (L157-L160)

* fix test expectation
This commit is contained in:
Dane Springmeyer
2018-06-29 22:17:29 -07:00
committed by GitHub
parent 647959a853
commit a70727245c
2 changed files with 2 additions and 2 deletions

View File

@@ -398,7 +398,7 @@ void NodeMap::Render(const Nan::FunctionCallbackInfo<v8::Value>& info) {
}
if (nodeMap->req) {
return Nan::ThrowError("Map is currently rendering an image");
return Nan::ThrowError("Map is currently processing a RenderRequest");
}
try {

View File

@@ -532,7 +532,7 @@ test('Map', function(t) {
t.throws(function() {
map.render({}, function() {});
map.render({}, function() {});
}, /Map is currently rendering an image/);
}, /Map is currently processing a RenderRequest/);
map.release();
t.end();