We need to return the error message for invalid parameter cases. --------------------------------------------------------------------- NAN_METHOD(NanInstance::setCameraOptions) { auto myself = ObjectWrap::Unwrap<NanInstance>(info.Holder()); info.GetReturnValue().Set(Nan::Undefined()); if (info.Length() == 1 && ((info[0]->IsObject()))) { // Method: name = setCameraOptions, taking 1 argument(s) auto arg0 = EXTRACT_v8_object(info[0]); // Return promise myself->impl_->SetJavaScriptThis(info.This()); auto promise = myself->impl_->setCameraOptions(arg0); info.GetReturnValue().Set(promise); } // Closing bracket of 'if (info.Length() == 1)' else { // TODO: handle no-match by modifying template nanCxxImplMethod.def } }
We need to return the error message for invalid parameter cases.
NAN_METHOD(NanInstance::setCameraOptions) {
auto myself = ObjectWrap::Unwrap(info.Holder());
info.GetReturnValue().Set(Nan::Undefined());
if (info.Length() == 1 && ((info[0]->IsObject()))) {
// Method: name = setCameraOptions, taking 1 argument(s)
} // Closing bracket of 'if (info.Length() == 1)'
else {
// TODO: handle no-match by modifying template nanCxxImplMethod.def
}
}