Replace the jerry_value_set_error_flag function with jerry_create_error_from_value (#2367)

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
This commit is contained in:
Istvan Miklos
2018-06-11 03:16:58 +02:00
committed by yichoi
parent be59d0a224
commit 2d0e37ff74
6 changed files with 83 additions and 33 deletions
+1 -1
View File
@@ -1053,7 +1053,7 @@ main (void)
{
jerry_init (JERRY_INIT_EMPTY);
jerry_value_t num_val = jerry_create_number (123);
jerry_value_set_error_flag (&num_val);
num_val = jerry_create_error_from_value (num_val, true);
TEST_ASSERT (jerry_value_is_error (num_val));
jerry_value_t num2_val = jerry_get_value_from_error (num_val, false);
TEST_ASSERT (jerry_value_is_error (num_val));