node-pitft icon indicating copy to clipboard operation
node-pitft copied to clipboard

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.

Open mihailssh opened this issue 8 years ago • 0 comments

Hi, in case FrameBuffer::FrameBuffer fails (I go that myself, but saw it also here) it will never show the right error message, because will be shadowed by

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.

Reason for it is code in

Local<Object> FrameBuffer::NewInstance(Local<Value> arg, Local<Value> arg2)

you are using

.ToLocalChecked();

and it will fail in case object is null. I think it needs to be replaced by the following

.FromMaybe(v8::Local<v8::Object>())

I can do the change if you also agree.

By the way throwing execution in constructor is not so good idea.

mihailssh avatar Sep 23 '18 21:09 mihailssh