[node] capture invalid input data as ParseError objects

This allows us to distinguish them from other types of errors
This commit is contained in:
Konstantin Käfer
2018-07-16 14:20:09 +02:00
committed by John Firebaugh
parent 1e454642c8
commit 30272924a9
5 changed files with 47 additions and 7 deletions

View File

@@ -37,6 +37,7 @@ public:
~NodeMap();
static Nan::Persistent<v8::Function> constructor;
static Nan::Persistent<v8::Object> parseError;
static void Init(v8::Local<v8::Object>);
@@ -67,6 +68,8 @@ public:
static void DumpDebugLogs(const Nan::FunctionCallbackInfo<v8::Value>&);
static void QueryRenderedFeatures(const Nan::FunctionCallbackInfo<v8::Value>&);
static v8::Local<v8::Value> ParseError(const char* msg);
void startRender(RenderOptions options);
void renderFinished();