-
Notifications
You must be signed in to change notification settings - Fork 683
Check error values in API functions #1167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check error values in API functions #1167
Conversation
Please check the travis fails. |
74342a9
to
886477c
Compare
@@ -62,6 +62,8 @@ static jerry_flag_t jerry_flags; | |||
*/ | |||
static bool jerry_api_available; | |||
|
|||
static const jerry_char_t *error_value_msg_p = (const jerry_char_t *) "argument cannot be an error value"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"cannot have an error flag" is better
886477c
to
4f4f916
Compare
@zherczeg, I've updated the PR. Please check. |
@@ -144,6 +144,7 @@ bool jerry_value_to_boolean (const jerry_value_t); | |||
jerry_value_t jerry_value_to_number (const jerry_value_t); | |||
jerry_value_t jerry_value_to_object (const jerry_value_t); | |||
jerry_value_t jerry_value_to_string (const jerry_value_t); | |||
jerry_value_t jerry_value_to_normal_value (const jerry_value_t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about jerry_value_remove_error_flag? I don't think people will understand the "normal" phrase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind to change it.
4f4f916
to
1a0127b
Compare
I was thinking, and I convinced myself that the current approach is right. |
Internal functions cannot handle error values, so it must be avoided to pass error values to the engine. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
1a0127b
to
c3541c3
Compare
LGTM |
Internal functions cannot handle error values, so it must be avoided to
pass error values to the engine.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com