Skip to content

Print the return value of the engine in case of TizenRT. #2171

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

Merged
merged 1 commit into from
Jan 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion targets/tizenrt-artik053/apps/jerryscript/jerry_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,21 @@ jerry_cmd_main (int argc, char *argv[])
return ret_code;
} /* jerry_cmd_main */

/**
* Run JerryScript and print its return value.
*/
static int
jerry(int argc, char *argv[])
{
int ret_code = jerry_cmd_main(argc, argv);

#ifdef CONFIG_DEBUG_VERBOSE
jerry_port_log(JERRY_LOG_LEVEL_DEBUG, "JerryScript result: %d\n", ret_code);
#endif

return ret_code;
} /* jerry */

/**
* Aborts the program.
*/
Expand Down Expand Up @@ -554,6 +569,6 @@ int main (int argc, FAR char *argv[])
int jerry_main (int argc, char *argv[])
#endif
{
tash_cmd_install("jerry", jerry_cmd_main, TASH_EXECMD_SYNC);
tash_cmd_install("jerry", jerry, TASH_EXECMD_SYNC);
return 0;
} /* main */