-
Notifications
You must be signed in to change notification settings - Fork 683
Implemented jerry_api_create_error() #76
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
Conversation
For #35 |
|
||
ecma_standard_error_t standard_error_type = ECMA_ERROR_COMMON; | ||
|
||
switch (error_type) |
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.
Do we really need additional level of abstraction for that? Why don't we simply use ECMA_ERROR_COMMON
, ECMA_ERROR_EVAL
etc? As for me, its better to extend ecma_standard_error_t
enum if needed and use it across the API.
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.
That was questionable for me too, Then let's make it use only ecma_standart_error_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 do you think about naming? should we change the name of enum entry like ECMA_ERROR_COMMON
to JERRY_ERROR_COMMON
?
@egavrin, Updated PR so that it uses |
* | ||
* See also: 15.11.1, 15.11.6 | ||
*/ | ||
typedef enum |
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.
There is no need to move this enum out of ecma-exceptions, since all related functionality is defined here. So, just reference ecma-exceptions.h
in jerry.cpp
.
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.
Would clients for libjerry be supposed referring only jerry-api.h? The api user need to know what kind of error they want to make. If the definition is in ecma-exception.h, user program of libjerry should also need that file to include.
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.
Ah...I got your concern. Let's go back to the issue discussion #35.
JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
@egavrin OK, rolled back to the first PR rebased on top of master. |
@ILyoan |
jerry_api_create_error()