Conversation
qile222
approved these changes
Oct 30, 2018
af47525 to
0f9cafd
Compare
yorkie
requested changes
Oct 31, 2018
src/napi/node_api_value.c
Outdated
| /** code has to be an JS string type, thus it can not be an number 0 */ \ | ||
| if (code != NULL) { \ | ||
| NAPI_TRY_TYPE(string, jval_code); \ | ||
| iotjs_jval_set_property_jval(jval_error, "code", jval_code); \ |
| \ | ||
| iotjs_jval_set_property_jval(jval_error, "code", jval_code); \ | ||
| /** code has to be an JS string type, thus it can not be an number 0 */ \ | ||
| if (code != NULL) { \ |
Contributor
Author
There was a problem hiding this comment.
it has been validated on next line only when code is not NULL - that is - code is given a value.
0f9cafd to
d371a84
Compare
yorkie
pushed a commit
that referenced
this pull request
Oct 31, 2018
legendecas
pushed a commit
that referenced
this pull request
Oct 31, 2018
* build: use CMAKE_INSTALL_PREFIX instead of custom install command (#391) * build: add dependencies for iotjs.cmake which depends on others (#396) Within some parallel builds, it occasionally gets a build error on libmqtt_packet depenedency. * events: cannot read property 'newListener' of undefined (#397) * tools: clang-format-7 on travis-ci (#398) * mqtt: update event trigger timing (#400) * fix/mqtt-connect-event * remove abundant error listener * n-api: code is optional on create error (#399) * v0.10.13: bump version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm testpassesAccording to N-API docs, second argument of napi_create_error/napi_create_type_error/napi_create_range_error shall be an optional string typed JS value.