Improve error messages

* Print location on parser errors.
 * Do not print messages on parse error if FEATURE_ERROR_MESSAGES is not set.
 * Minor style fixes

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2016-09-05 09:39:03 +02:00
parent cf94a25753
commit 5c330d7f8e
6 changed files with 98 additions and 21 deletions
+2 -2
View File
@@ -85,7 +85,7 @@ assert_handler (const jerry_value_t func_obj_val __attribute__((unused)), /**< f
}
else
{
jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Script error: assertion failed\n");
jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Script Error: assertion failed\n");
exit (JERRY_STANDALONE_EXIT_CODE_FAIL);
}
} /* assert_handler */
@@ -144,7 +144,7 @@ print_unhandled_exception (jerry_value_t error_value)
}
err_str_buf[err_str_size] = 0;
jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Script Error: unhandled exception: %s\n", err_str_buf);
jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Script Error: %s\n", err_str_buf);
jerry_release_value (err_str_val);
} /* print_unhandled_exception */