Remove full stop after error messages (#4524)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-01-28 12:10:13 +01:00
committed by GitHub
parent e081cbc2f0
commit ba06d492a3
82 changed files with 551 additions and 523 deletions
@@ -56,7 +56,7 @@ ecma_builtin_array_iterator_prototype_object_next (ecma_value_t this_val) /**< t
/* 1 - 2. */
if (!ecma_is_value_object (this_val))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an object"));
}
ecma_object_t *obj_p = ecma_get_object_from_value (this_val);
@@ -66,7 +66,7 @@ ecma_builtin_array_iterator_prototype_object_next (ecma_value_t this_val) /**< t
if (ecma_get_object_type (obj_p) != ECMA_OBJECT_TYPE_PSEUDO_ARRAY
|| ext_obj_p->u.pseudo_array.type != ECMA_PSEUDO_ARRAY_ITERATOR)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an iterator."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an iterator"));
}
ecma_value_t iterated_value = ext_obj_p->u.pseudo_array.u2.iterated_value;
@@ -87,7 +87,7 @@ ecma_builtin_array_iterator_prototype_object_next (ecma_value_t this_val) /**< t
ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (array_object_p);
if (ecma_arraybuffer_is_detached (arraybuffer_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached"));
}
/* b. */
@@ -393,7 +393,7 @@ ecma_builtin_array_prototype_object_pop (ecma_object_t *obj_p, /**< object */
if (!ecma_op_ordinary_object_is_extensible (obj_p))
{
ecma_free_value (get_value);
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid argument type."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid argument type"));
}
ecma_delete_fast_array_properties (obj_p, (uint32_t) len);
@@ -443,12 +443,12 @@ ecma_builtin_array_prototype_object_push (const ecma_value_t *argument_list_p, /
{
if (!ecma_op_ordinary_object_is_extensible (obj_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid argument type."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid argument type"));
}
if ((ecma_number_t) (length + arguments_number) > UINT32_MAX)
{
return ecma_raise_range_error (ECMA_ERR_MSG ("Invalid array length"));
return ecma_raise_range_error (ECMA_ERR_MSG ("Invalid Array length"));
}
if (arguments_number == 0)
@@ -1109,7 +1109,7 @@ ecma_builtin_array_prototype_object_sort (ecma_value_t this_arg, /**< this argum
/* Check if the provided compare function is callable. */
if (!ecma_is_value_undefined (arg1) && !ecma_op_is_callable (arg1))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Compare function is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Compare function is not callable"));
}
ecma_length_t len;
@@ -1308,7 +1308,7 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
/* ES11: 8. */
if ((ecma_number_t) new_length > ECMA_NUMBER_MAX_SAFE_INTEGER)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid new array length"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid new Array length"));
}
/* ES11: 9. */
@@ -1519,7 +1519,7 @@ ecma_builtin_array_prototype_object_unshift (const ecma_value_t args[], /**< arg
{
if (args_number > UINT32_MAX - len)
{
return ecma_raise_range_error (ECMA_ERR_MSG ("Invalid array length"));
return ecma_raise_range_error (ECMA_ERR_MSG ("Invalid Array length"));
}
if (args_number == 0)
@@ -1863,7 +1863,7 @@ ecma_builtin_array_apply (ecma_value_t arg1, /**< callbackfn */
/* 4. */
if (!ecma_op_is_callable (arg1))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable"));
}
/* We already checked that arg1 is callable */
@@ -1946,7 +1946,7 @@ ecma_builtin_array_prototype_object_map (ecma_value_t arg1, /**< callbackfn */
/* 4. */
if (!ecma_op_is_callable (arg1))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable"));
}
/* 6. */
@@ -2040,7 +2040,7 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t arg1, /**< callbackfn *
/* 4. */
if (!ecma_op_is_callable (arg1))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable"));
}
/* 6. */
@@ -2148,13 +2148,13 @@ ecma_builtin_array_reduce_from (const ecma_value_t args_p[], /**< routine's argu
/* 4. */
if (!ecma_op_is_callable (args_p[0]))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable"));
}
/* 5. */
if (len == 0 && args_number == 1)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Reduce of empty array with no initial value."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Reduce of empty Array with no initial value"));
}
JERRY_ASSERT (ecma_is_value_object (args_p[0]));
@@ -2207,7 +2207,7 @@ ecma_builtin_array_reduce_from (const ecma_value_t args_p[], /**< routine's argu
/* 8.c */
if (!k_present)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Missing array element."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Missing Array element"));
}
}
/* 9. */
@@ -2367,7 +2367,7 @@ ecma_builtin_array_prototype_object_find (ecma_value_t predicate, /**< callback
/* 5. */
if (!ecma_op_is_callable (predicate))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable"));
}
/* We already checked that predicate is callable, so it will always be an object. */
@@ -2851,7 +2851,7 @@ ecma_builtin_array_prototype_object_flat_map (ecma_value_t callback, /**< callba
{
if (!ecma_op_is_callable (callback))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable"));
}
/* 4. */
@@ -96,7 +96,7 @@ ecma_builtin_array_object_from (ecma_value_t this_arg, /**< 'this' argument */
/* 3.a */
if (!ecma_op_is_callable (mapfn))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable"));
}
/* 3.b */
@@ -493,7 +493,7 @@ ecma_builtin_array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arg
if (num != ((ecma_number_t) num_uint32))
{
return ecma_raise_range_error (ECMA_ERR_MSG ("Invalid array length."));
return ecma_raise_range_error (ECMA_ERR_MSG ("Invalid array length"));
}
return ecma_make_object_value (ecma_op_new_array_object (num_uint32));
@@ -65,7 +65,7 @@ ecma_builtin_arraybuffer_prototype_bytelength_getter (ecma_value_t this_arg) /**
{
if (ecma_arraybuffer_is_detached (object_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached"));
}
uint32_t len = ecma_arraybuffer_get_length (object_p);
@@ -73,7 +73,7 @@ ecma_builtin_arraybuffer_prototype_bytelength_getter (ecma_value_t this_arg) /**
}
}
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a ArrayBuffer object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a ArrayBuffer object"));
} /* ecma_builtin_arraybuffer_prototype_bytelength_getter */
/**
@@ -92,7 +92,7 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi
{
if (!ecma_is_value_object (this_arg))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an object"));
}
ecma_object_t *object_p = ecma_get_object_from_value (this_arg);
@@ -100,7 +100,7 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi
/* 2. */
if (!ecma_object_class_is (object_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an ArrayBuffer object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an ArrayBuffer object"));
}
/* TODO: step 3. if SharedArrayBuffer will be implemented */
@@ -108,7 +108,7 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi
/* 4. */
if (ecma_arraybuffer_is_detached (object_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached"));
}
/* 5. */
@@ -170,7 +170,7 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi
/* 13. */
if (!ecma_object_class_is (new_arraybuffer_p, LIT_MAGIC_STRING_ARRAY_BUFFER_UL))
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Return value is not an ArrayBuffer object."));
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Return value is not an ArrayBuffer object"));
goto free_new_arraybuffer;
}
@@ -179,7 +179,7 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi
/* 15. */
if (ecma_arraybuffer_is_detached (new_arraybuffer_p))
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Return ArrayBuffer has been detached."));
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Returned ArrayBuffer has been detached"));
goto free_new_arraybuffer;
}
@@ -193,14 +193,14 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi
/* 17. */
if (ecma_arraybuffer_get_length (new_arraybuffer_p) < new_len)
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Derived ArrayBuffer constructor created a too small buffer."));
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Derived ArrayBuffer constructor created a too small buffer"));
goto free_new_arraybuffer;
}
/* 19. */
if (ecma_arraybuffer_is_detached (object_p))
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Original ArrayBuffer has been detached."));
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Original ArrayBuffer has been detached"));
goto free_new_arraybuffer;
}
@@ -115,7 +115,7 @@ ecma_builtin_async_generator_prototype_dispatch_routine (uint8_t builtin_routine
if (executable_object_p == NULL)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an async generator object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an async generator object"));
}
if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_COMPLETED)
@@ -69,7 +69,7 @@ ecma_builtin_bigint_prototype_object_value_of (ecma_value_t this_arg) /**< this
}
}
return ecma_raise_type_error (ECMA_ERR_MSG ("BigInt value expected."));
return ecma_raise_type_error (ECMA_ERR_MSG ("BigInt value expected"));
} /* ecma_builtin_bigint_prototype_object_value_of */
/**
@@ -108,7 +108,7 @@ ecma_builtin_bigint_prototype_object_to_string (ecma_value_t this_arg, /**< this
if (arg_num < 2 || arg_num > 36)
{
ecma_free_value (bigint);
return ecma_raise_range_error (ECMA_ERR_MSG ("Radix must be between 2 and 36."));
return ecma_raise_range_error (ECMA_ERR_MSG ("Radix must be between 2 and 36"));
}
radix = (uint32_t) arg_num;
@@ -68,7 +68,7 @@ ecma_builtin_bigint_dispatch_construct (const ecma_value_t *arguments_list_p, /*
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("BigInt function is not a constructor."));
return ecma_raise_type_error (ECMA_ERR_MSG ("BigInt function is not a constructor"));
} /* ecma_builtin_bigint_dispatch_construct */
/**
@@ -88,7 +88,7 @@ ecma_builtin_boolean_prototype_object_value_of (ecma_value_t this_arg) /**< this
}
}
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a Boolean object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a Boolean object"));
} /* ecma_builtin_boolean_prototype_object_value_of */
/**
@@ -122,7 +122,7 @@ ecma_builtin_dataview_prototype_object_getters (ecma_value_t this_arg, /**< this
{
if (ecma_arraybuffer_is_detached (obj_p->buffer_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached"));
}
return ecma_make_uint32_value (obj_p->header.u.class_prop.u.length);
}
@@ -132,7 +132,7 @@ ecma_builtin_dataview_prototype_object_getters (ecma_value_t this_arg, /**< this
if (ecma_arraybuffer_is_detached (obj_p->buffer_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached"));
}
return ecma_make_uint32_value (obj_p->byte_offset);
}
@@ -47,7 +47,7 @@ ecma_builtin_dataview_dispatch_call (const ecma_value_t *arguments_list_p, /**<
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor DataView requires 'new'."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor DataView requires 'new'"));
} /* ecma_builtin_dataview_dispatch_call */
/**
@@ -214,7 +214,7 @@ ecma_builtin_date_prototype_to_primitive (ecma_value_t this_arg, /**< this argum
}
}
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid argument type in toPrimitive."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid argument type in toPrimitive"));
} /* ecma_builtin_date_prototype_to_primitive */
#endif /* ENABLED (JERRY_ESNEXT) */
@@ -607,7 +607,7 @@ ecma_builtin_date_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< b
if (!ecma_is_value_object (this_arg)
|| !ecma_object_class_is (ecma_get_object_from_value (this_arg), LIT_MAGIC_STRING_DATE_UL))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a Date object"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a Date object"));
}
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) ecma_get_object_from_value (this_arg);
@@ -658,7 +658,7 @@ ecma_builtin_date_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< b
{
if (ecma_number_is_nan (*prim_value_p) || ecma_number_is_infinity (*prim_value_p))
{
return ecma_raise_range_error (ECMA_ERR_MSG ("Date must be a finite number."));
return ecma_raise_range_error (ECMA_ERR_MSG ("Date must be a finite number"));
}
return ecma_date_value_to_iso_string (*prim_value_p);
@@ -86,7 +86,7 @@ ecma_builtin_error_prototype_object_to_string (ecma_value_t this_arg) /**< this
/* 2. */
if (!ecma_is_value_object (this_arg))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an object"));
}
ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);
@@ -107,7 +107,7 @@ ecma_builtin_function_prototype_object_apply (ecma_object_t *func_obj_p, /**< th
/* 3. */
if (!ecma_is_value_object (arg2))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object"));
}
ecma_object_t *obj_p = ecma_get_object_from_value (arg2);
@@ -123,7 +123,7 @@ ecma_builtin_function_prototype_object_apply (ecma_object_t *func_obj_p, /**< th
if (length >= ECMA_FUNCTION_APPLY_ARGUMENT_COUNT_LIMIT)
{
return ecma_raise_range_error (ECMA_ERR_MSG ("Too many arguments declared for Function.apply()."));
return ecma_raise_range_error (ECMA_ERR_MSG ("Too many arguments declared for Function.apply"));
}
/* 6. */
@@ -406,7 +406,7 @@ ecma_builtin_function_prototype_dispatch_construct (const ecma_value_t *argument
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("'Function.prototype' is not a constructor."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Function.prototype is not a constructor"));
} /* ecma_builtin_function_prototype_dispatch_construct */
/**
@@ -431,7 +431,7 @@ ecma_builtin_function_prototype_dispatch_routine (uint8_t builtin_routine_id, /*
}
#endif /* ENABLED (JERRY_ESNEXT) */
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a function."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a function"));
}
ecma_object_t *func_obj_p = ecma_get_object_from_value (this_arg);
@@ -228,12 +228,12 @@ ecma_builtin_generator_prototype_dispatch_routine (uint8_t builtin_routine_id, /
if (executable_object_p == NULL)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a generator object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a generator object"));
}
if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_RUNNING)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Generator is currently under execution."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Generator is currently under execution"));
}
if (executable_object_p->extended_object.u.class_prop.extra_info & ECMA_EXECUTABLE_OBJECT_COMPLETED)
@@ -216,7 +216,7 @@ ecma_builtin_global_object_decode_uri_helper (lit_utf8_byte_t *input_start_p, /*
if (hex_value == UINT32_MAX)
{
ecma_stringbuilder_destroy (&builder);
return ecma_raise_uri_error (ECMA_ERR_MSG ("Invalid hexadecimal value."));
return ecma_raise_uri_error (ECMA_ERR_MSG ("Invalid hexadecimal value"));
}
ecma_char_t decoded_byte = (ecma_char_t) hex_value;
@@ -254,7 +254,7 @@ ecma_builtin_global_object_decode_uri_helper (lit_utf8_byte_t *input_start_p, /*
else
{
ecma_stringbuilder_destroy (&builder);
return ecma_raise_uri_error (ECMA_ERR_MSG ("Invalid UTF8 character."));
return ecma_raise_uri_error (ECMA_ERR_MSG ("Invalid UTF8 character"));
}
lit_utf8_byte_t octets[LIT_UTF8_MAX_BYTES_IN_CODE_POINT];
@@ -287,7 +287,7 @@ ecma_builtin_global_object_decode_uri_helper (lit_utf8_byte_t *input_start_p, /*
|| !lit_is_valid_utf8_string (octets, bytes_count))
{
ecma_stringbuilder_destroy (&builder);
return ecma_raise_uri_error (ECMA_ERR_MSG ("Invalid UTF8 string."));
return ecma_raise_uri_error (ECMA_ERR_MSG ("Invalid UTF8 string"));
}
lit_code_point_t cp;
@@ -297,7 +297,7 @@ ecma_builtin_global_object_decode_uri_helper (lit_utf8_byte_t *input_start_p, /*
|| lit_is_code_point_utf16_low_surrogate (cp))
{
ecma_stringbuilder_destroy (&builder);
return ecma_raise_uri_error (ECMA_ERR_MSG ("Invalid UTF8 codepoint."));
return ecma_raise_uri_error (ECMA_ERR_MSG ("Invalid UTF8 codepoint"));
}
lit_utf8_byte_t result_chars[LIT_CESU8_MAX_BYTES_IN_CODE_POINT];
@@ -356,7 +356,7 @@ ecma_builtin_global_object_encode_uri_helper (lit_utf8_byte_t *input_start_p, /*
if (lit_is_code_point_utf16_low_surrogate (ch))
{
ecma_stringbuilder_destroy (&builder);
return ecma_raise_uri_error (ECMA_ERR_MSG ("Unicode surrogate pair missing."));
return ecma_raise_uri_error (ECMA_ERR_MSG ("Unicode surrogate pair missing"));
}
lit_code_point_t cp = ch;
@@ -366,7 +366,7 @@ ecma_builtin_global_object_encode_uri_helper (lit_utf8_byte_t *input_start_p, /*
if (input_char_p == input_end_p)
{
ecma_stringbuilder_destroy (&builder);
return ecma_raise_uri_error (ECMA_ERR_MSG ("Unicode surrogate pair missing."));
return ecma_raise_uri_error (ECMA_ERR_MSG ("Unicode surrogate pair missing"));
}
ecma_char_t next_ch;
@@ -380,7 +380,7 @@ ecma_builtin_global_object_encode_uri_helper (lit_utf8_byte_t *input_start_p, /*
else
{
ecma_stringbuilder_destroy (&builder);
return ecma_raise_uri_error (ECMA_ERR_MSG ("Unicode surrogate pair missing."));
return ecma_raise_uri_error (ECMA_ERR_MSG ("Unicode surrogate pair missing"));
}
}
@@ -369,7 +369,7 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *array_obj_p, /**< array *
/* 4 . */
if ((ecma_number_t) (*length_p + arg_len) > ECMA_NUMBER_MAX_SAFE_INTEGER)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid array length."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid array length"));
}
#else /* !ENABLED (JERRY_ESNEXT) */
/* 5.b.ii */
@@ -171,12 +171,12 @@ ecma_builtin_intrinsic_dispatch_routine (uint8_t builtin_routine_id, /**< built-
{
if (!ecma_is_typedarray (this_arg))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a TypedArray."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a TypedArray"));
}
if (ecma_arraybuffer_is_detached (ecma_typedarray_get_arraybuffer (ecma_get_object_from_value (this_arg))))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached"));
}
return ecma_typedarray_iterators_helper (this_arg, ECMA_ITERATOR_VALUES);
@@ -207,7 +207,7 @@ ecma_builtin_intrinsic_dispatch_routine (uint8_t builtin_routine_id, /**< built-
if (!ecma_is_value_object (this_arg)
|| !ecma_object_class_is (ecma_get_object_from_value (this_arg), LIT_MAGIC_STRING_DATE_UL))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a Date object"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a Date object"));
}
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) ecma_get_object_from_value (this_arg);
@@ -818,7 +818,7 @@ ecma_builtin_json_parse_buffer (const lit_utf8_byte_t * str_start_p, /**< String
ecma_free_value (result);
}
return ecma_raise_syntax_error (ECMA_ERR_MSG ("Invalid JSON format."));
return ecma_raise_syntax_error (ECMA_ERR_MSG ("Invalid JSON format"));
} /*ecma_builtin_json_parse_buffer*/
/**
@@ -1000,7 +1000,7 @@ ecma_builtin_json_serialize_object (ecma_json_stringify_context_t *context_p, /*
/* 1. */
if (ecma_json_has_object_in_stack (context_p->occurence_stack_last_p, obj_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("The structure is cyclical."));
return ecma_raise_type_error (ECMA_ERR_MSG ("The structure is cyclical"));
}
/* 2. */
@@ -1137,7 +1137,7 @@ ecma_builtin_json_serialize_array (ecma_json_stringify_context_t *context_p, /**
/* 1. */
if (ecma_json_has_object_in_stack (context_p->occurence_stack_last_p, obj_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("The structure is cyclical."));
return ecma_raise_type_error (ECMA_ERR_MSG ("The structure is cyclical"));
}
/* 2. */
@@ -47,7 +47,7 @@ ecma_builtin_map_dispatch_call (const ecma_value_t *arguments_list_p, /**< argum
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Map requires 'new'."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Map requires 'new'"));
} /* ecma_builtin_map_dispatch_call */
/**
@@ -168,7 +168,7 @@ ecma_builtin_number_prototype_object_to_string (ecma_number_t this_arg_number, /
if (radix < 2 || radix > 36)
{
return ecma_raise_range_error (ECMA_ERR_MSG ("Radix must be between 2 and 36."));
return ecma_raise_range_error (ECMA_ERR_MSG ("Radix must be between 2 and 36"));
}
}
@@ -456,7 +456,7 @@ ecma_builtin_number_prototype_object_value_of (ecma_value_t this_arg) /**< this
}
}
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a Number or a Number object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a number or a Number object"));
} /* ecma_builtin_number_prototype_object_value_of */
/**
@@ -496,7 +496,7 @@ ecma_builtin_number_prototype_object_to_number_convert (ecma_number_t this_num,
if (mode == NUMBER_ROUTINE_TO_FIXED
&& (arg_num <= -1 || arg_num >= 101))
{
return ecma_raise_range_error (ECMA_ERR_MSG ("Fraction digits must be between 0 and 100."));
return ecma_raise_range_error (ECMA_ERR_MSG ("Fraction digits must be between 0 and 100"));
}
/* Handle NaN separately */
@@ -565,13 +565,13 @@ ecma_builtin_number_prototype_object_to_number_convert (ecma_number_t this_num,
&& (arg_num <= -1 || arg_num >= 101))
{
ecma_stringbuilder_destroy (&builder);
return ecma_raise_range_error (ECMA_ERR_MSG ("Fraction digits must be between 0 and 100."));
return ecma_raise_range_error (ECMA_ERR_MSG ("Fraction digits must be between 0 and 100"));
}
else if (mode == NUMBER_ROUTINE_TO_PRECISION
&& (arg_num < 1 || arg_num > 100))
{
ecma_stringbuilder_destroy (&builder);
return ecma_raise_range_error (ECMA_ERR_MSG ("Precision digits must be between 1 and 100."));
return ecma_raise_range_error (ECMA_ERR_MSG ("Precision digits must be between 1 and 100"));
}
num_of_digits = ecma_number_to_decimal (this_num, digits, &exponent);
@@ -240,7 +240,7 @@ ecma_builtin_object_prototype_define_getter_setter (ecma_value_t this_arg, /**<
if (!ecma_op_is_callable (accessor))
{
ecma_deref_object (obj_p);
return ecma_raise_type_error (ECMA_ERR_MSG ("Getter is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Getter is not callable"));
}
ecma_object_t *accessor_obj_p = ecma_get_object_from_value (accessor);
@@ -198,7 +198,7 @@ ecma_builtin_object_object_set_prototype_of (ecma_value_t arg1, /**< routine's f
/* 3. */
if (!ecma_is_value_object (arg2) && !ecma_is_value_null (arg2))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("proto is neither Object nor Null."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Prototype is neither object nor null"));
}
/* 4. */
@@ -231,7 +231,7 @@ ecma_builtin_object_object_set_prototype_of (ecma_value_t arg1, /**< routine's f
if (ecma_is_value_false (status))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Cannot set [[Prototype]]."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Cannot set [[Prototype]]"));
}
JERRY_ASSERT (ecma_is_value_true (status));
@@ -295,7 +295,7 @@ ecma_builtin_object_object_set_proto (ecma_value_t arg1, /**< routine's first ar
if (ecma_is_value_false (status))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Cannot set [[Prototype]]."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Cannot set [[Prototype]]"));
}
JERRY_ASSERT (ecma_is_value_true (status));
@@ -470,7 +470,7 @@ ecma_builtin_object_object_seal (ecma_object_t *obj_p) /**< routine's argument *
#if ENABLED (JERRY_BUILTIN_PROXY)
if (ecma_is_value_false (status))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Object cannot be sealed."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Object cannot be sealed"));
}
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
@@ -501,7 +501,7 @@ ecma_builtin_object_object_freeze (ecma_object_t *obj_p) /**< routine's argument
#if ENABLED (JERRY_BUILTIN_PROXY)
if (ecma_is_value_false (status))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Object cannot be frozen."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Object cannot be frozen"));
}
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
@@ -534,7 +534,7 @@ ecma_builtin_object_object_prevent_extensions (ecma_object_t *obj_p) /**< routin
if (ecma_is_value_false (status))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Cannot set [[Extensible]] property of the object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Cannot set [[Extensible]] property of object"));
}
JERRY_ASSERT (ecma_is_value_true (status));
@@ -956,7 +956,7 @@ ecma_builtin_object_object_create (ecma_value_t arg1, /**< routine's first argum
/* 1. */
if (!ecma_is_value_object (arg1) && !ecma_is_value_null (arg1))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object"));
}
ecma_object_t *obj_p = NULL;
@@ -1025,7 +1025,7 @@ ecma_builtin_object_object_define_property (ecma_object_t *obj_p, /**< routine's
if (ecma_is_value_false (define_own_prop_ret))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("The requested property update cannot be performed."));
return ecma_raise_type_error (ECMA_ERR_MSG ("The requested property update cannot be performed"));
}
JERRY_ASSERT (ecma_is_value_true (define_own_prop_ret));
@@ -1226,7 +1226,7 @@ ecma_builtin_object_from_entries (ecma_value_t iterator) /**< object's iterator
if (!ecma_is_value_object (result))
{
ecma_free_value (result);
ecma_raise_type_error (ECMA_ERR_MSG ("Iterator value is not an object."));
ecma_raise_type_error (ECMA_ERR_MSG ("Iterator value is not an object"));
result = ecma_op_iterator_close (original_iterator);
JERRY_ASSERT (ECMA_IS_VALUE_ERROR (result));
goto cleanup_iterator;
@@ -1415,7 +1415,7 @@ ecma_builtin_object_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
#if !ENABLED (JERRY_ESNEXT)
if (!ecma_is_value_object (arg1))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object"));
}
#endif /* !ENABLED (JERRY_ESNEXT) */
@@ -1424,7 +1424,7 @@ ecma_builtin_object_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
#if ENABLED (JERRY_ESNEXT)
if (!ecma_is_value_object (arg1))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object"));
}
#endif /* ENABLED (JERRY_ESNEXT) */
@@ -136,7 +136,7 @@ ecma_builtin_promise_perform_race (ecma_value_t iterator, /**< the iterator for
if (!ecma_op_is_callable (resolve))
{
ecma_free_value (resolve);
return ecma_raise_type_error (ECMA_ERR_MSG ("Resolve method must be callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Resolve method must be callable"));
}
ecma_object_t *resolve_func_p = ecma_get_object_from_value (resolve);
@@ -233,7 +233,7 @@ ecma_builtin_promise_perform_all (ecma_value_t iterator, /**< iteratorRecord */
if (!ecma_op_is_callable (resolve))
{
ecma_free_value (resolve);
return ecma_raise_type_error (ECMA_ERR_MSG ("Resolve method must be callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Resolve method must be callable"));
}
ecma_object_t *resolve_func_p = ecma_get_object_from_value (resolve);
@@ -312,7 +312,7 @@ ecma_builtin_promise_perform_all (ecma_value_t iterator, /**< iteratorRecord */
if (JERRY_UNLIKELY (idx == UINT32_MAX - 1))
{
ecma_raise_range_error (ECMA_ERR_MSG ("Promise.all remaining elements limit reached."));
ecma_raise_range_error (ECMA_ERR_MSG ("Promise.all remaining elements limit reached"));
goto exit;
}
@@ -436,7 +436,7 @@ ecma_builtin_promise_dispatch_call (const ecma_value_t *arguments_list_p, /**< a
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Promise requires 'new'."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Promise requires 'new'"));
} /* ecma_builtin_promise_dispatch_call */
/**
@@ -452,7 +452,7 @@ ecma_builtin_promise_dispatch_construct (const ecma_value_t *arguments_list_p, /
if (arguments_list_len == 0 || !ecma_op_is_callable (arguments_list_p[0]))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("First parameter must be callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("First parameter must be callable"));
}
return ecma_op_create_promise_object (arguments_list_p[0], ECMA_PROMISE_EXECUTOR_FUNCTION);
@@ -91,7 +91,7 @@ ecma_builtin_reflect_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
/* 1. */
if (arguments_number == 0 || !ecma_is_value_object (arguments_list[0]))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an Object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object"));
}
/* 2. */
@@ -159,7 +159,7 @@ ecma_builtin_reflect_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
/* 1. */
if (arguments_number == 0 || !ecma_is_value_object (arguments_list[0]))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an Object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object"));
}
ecma_object_t *target_p = ecma_get_object_from_value (arguments_list[0]);
@@ -205,7 +205,7 @@ ecma_builtin_reflect_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
/* 4. */
if (arguments_number < 2)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Reflect.construct requires the second argument be an object"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Reflect.construct expects an object as second argument"));
}
ecma_collection_t *coll_p = ecma_op_create_list_from_array_like (arguments_list[1], false);
@@ -226,7 +226,7 @@ ecma_builtin_reflect_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
if (!ecma_is_value_object (arguments_list[0]))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an Object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object"));
}
switch (builtin_routine_id)
@@ -239,7 +239,7 @@ ecma_builtin_reflect_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
{
if (!ecma_is_value_object (arguments_list[1]) && !ecma_is_value_null (arguments_list[1]))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("proto is neither Object nor Null."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Prototype is neither object nor null"));
}
ecma_object_t *obj_p = ecma_get_object_from_value (arguments_list[0]);
@@ -262,7 +262,7 @@ ecma_builtin_reflect_dispatch_routine (uint8_t builtin_routine_id, /**< built-in
{
if (!ecma_op_is_callable (arguments_list[0]))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a function."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a function"));
}
ecma_object_t *func_obj_p = ecma_get_object_from_value (arguments_list[0]);
@@ -280,7 +280,7 @@ ecma_builtin_regexp_prototype_compile (ecma_value_t this_arg, /**< this */
#if !ENABLED (JERRY_ESNEXT)
if (ecma_get_object_from_value (this_arg) == ecma_builtin_get (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a RegExp object"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a RegExp object"));
}
#endif /* !ENABLED (JERRY_ESNEXT) */
@@ -679,23 +679,21 @@ ecma_builtin_regexp_prototype_dispatch_routine (uint8_t builtin_routine_id, /**<
ecma_object_t *obj_p = NULL;
/* 1. && 2. */
if (ecma_is_value_object (this_arg))
{
/* 2. */
obj_p = ecma_get_object_from_value (this_arg);
if (require_regexp && !ecma_object_class_is (obj_p, LIT_MAGIC_STRING_REGEXP_UL))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a RegExp object"));
obj_p = NULL;
}
}
/* 1. */
else
{
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not an object"));
}
JERRY_ASSERT (obj_p != NULL);
if (obj_p == NULL)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an object"));
}
switch (builtin_routine_id)
{
@@ -751,7 +749,7 @@ ecma_builtin_regexp_prototype_dispatch_routine (uint8_t builtin_routine_id, /**<
return ecma_make_magic_string_value (LIT_MAGIC_STRING_EMPTY_NON_CAPTURE_GROUP);
}
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a RegExp object"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a RegExp object"));
}
ecma_extended_object_t *re_obj_p = (ecma_extended_object_t *) obj_p;
@@ -771,7 +769,7 @@ ecma_builtin_regexp_prototype_dispatch_routine (uint8_t builtin_routine_id, /**<
return ECMA_VALUE_UNDEFINED;
}
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a RegExp object"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a RegExp object"));
}
ecma_extended_object_t *re_obj_p = (ecma_extended_object_t *) obj_p;
@@ -57,7 +57,7 @@ ecma_builtin_regexp_string_iterator_prototype_object_next (ecma_value_t this_val
/* 2. */
if (!ecma_is_value_object (this_val))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an object"));
}
ecma_object_t *obj_p = ecma_get_object_from_value (this_val);
@@ -67,7 +67,7 @@ ecma_builtin_regexp_string_iterator_prototype_object_next (ecma_value_t this_val
if (ecma_get_object_type (obj_p) != ECMA_OBJECT_TYPE_PSEUDO_ARRAY
|| ext_obj_p->u.pseudo_array.type != ECMA_PSEUDO_REGEXP_STRING_ITERATOR)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an iterator."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an iterator"));
}
ecma_regexp_string_iterator_t *regexp_string_iterator_obj = (ecma_regexp_string_iterator_t *) obj_p;
@@ -152,7 +152,7 @@ ecma_builtin_regexp_dispatch_helper (const ecma_value_t *arguments_list_p, /**<
return ecma_copy_value (pattern_value);
}
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid argument of RegExp call."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid argument is passed to RegExp function"));
}
#endif /* ENABLED (JERRY_ESNEXT) */
@@ -47,7 +47,7 @@ ecma_builtin_set_dispatch_call (const ecma_value_t *arguments_list_p, /**< argum
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Set requires 'new'."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Set requires 'new'"));
} /* ecma_builtin_set_dispatch_call */
/**
@@ -54,7 +54,7 @@ ecma_builtin_string_iterator_prototype_object_next (ecma_value_t this_val) /**<
/* 1 - 2. */
if (!ecma_is_value_object (this_val))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an object"));
}
ecma_object_t *obj_p = ecma_get_object_from_value (this_val);
@@ -64,7 +64,7 @@ ecma_builtin_string_iterator_prototype_object_next (ecma_value_t this_val) /**<
if (ecma_get_object_type (obj_p) != ECMA_OBJECT_TYPE_PSEUDO_ARRAY
|| ext_obj_p->u.pseudo_array.type != ECMA_PSEUDO_STRING_ITERATOR)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an iterator."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not an iterator"));
}
ecma_value_t iterated_value = ext_obj_p->u.pseudo_array.u2.iterated_value;
@@ -84,7 +84,7 @@ ecma_builtin_string_iterator_prototype_object_next (ecma_value_t this_val) /**<
if (JERRY_UNLIKELY (position == ECMA_ITERATOR_INDEX_LIMIT))
{
return ecma_raise_range_error (ECMA_ERR_MSG ("String iteration cannot be continued."));
return ecma_raise_range_error (ECMA_ERR_MSG ("String iteration cannot be continued"));
}
/* 7. */
@@ -140,7 +140,7 @@ ecma_builtin_string_prototype_object_to_string (ecma_value_t this_arg) /**< this
}
}
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a String or a String object."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a string or a String object"));
} /* ecma_builtin_string_prototype_object_to_string */
/**
@@ -447,7 +447,7 @@ ecma_builtin_string_prototype_object_match_all (ecma_value_t this_argument, /**<
if (!(parsed_flag & RE_FLAG_GLOBAL))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("RegExp argument should have global flag."));
return ecma_raise_type_error (ECMA_ERR_MSG ("RegExp argument should have global flag"));
}
}
@@ -567,7 +567,7 @@ ecma_builtin_string_prototype_object_replace_helper (ecma_value_t this_value, /*
if (!have_global_flag)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("RegExp argument should have global flag."));
return ecma_raise_type_error (ECMA_ERR_MSG ("RegExp argument should have global flag"));
}
}
}
@@ -309,7 +309,7 @@ ecma_builtin_string_object_from_code_point (ecma_value_t this_arg, /**< 'this' a
if (to_number_num < 0 || to_number_num > LIT_UNICODE_CODE_POINT_MAX)
{
ecma_stringbuilder_destroy (&builder);
return ecma_raise_range_error (ECMA_ERR_MSG ("Error: Invalid code point"));
return ecma_raise_range_error (ECMA_ERR_MSG ("Invalid code point"));
}
lit_code_point_t code_point = (lit_code_point_t) to_number_num;
@@ -75,7 +75,7 @@ ecma_builtin_symbol_dispatch_construct (const ecma_value_t *arguments_list_p, /*
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Symbol is not a constructor."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Symbol is not a constructor"));
} /* ecma_builtin_symbol_dispatch_construct */
/**
@@ -242,7 +242,7 @@ ecma_builtin_symbol_key_for (ecma_value_t this_arg, /**< this argument */
/* 1. */
if (!ecma_is_value_symbol (symbol))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("The given argument is not a Symbol."));
return ecma_raise_type_error (ECMA_ERR_MSG ("The given argument is not a Symbol"));
}
/* 2-4. */
@@ -47,7 +47,7 @@ ecma_builtin_weakmap_dispatch_call (const ecma_value_t *arguments_list_p, /**< a
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor WeakMap requires 'new'."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor WeakMap requires 'new'"));
} /* ecma_builtin_weakmap_dispatch_call */
/**
@@ -47,7 +47,7 @@ ecma_builtin_weakset_dispatch_call (const ecma_value_t *arguments_list_p, /**< a
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor WeakSet requires 'new'."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor WeakSet requires 'new'"));
} /* ecma_builtin_weakset_dispatch_call */
/**
@@ -1545,7 +1545,7 @@ ecma_builtin_dispatch_construct (ecma_object_t *obj_p, /**< built-in object */
if (ecma_builtin_function_is_routine (obj_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Built-in routines have no constructor."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Built-in routines have no constructor"));
}
ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;
@@ -54,7 +54,7 @@ ecma_builtin_bigint64array_dispatch_call (const ecma_value_t *arguments_list_p,
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("BigInt64Array cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor BigInt64Array requires 'new'"));
} /* ecma_builtin_bigint64array_dispatch_call */
/**
@@ -54,7 +54,7 @@ ecma_builtin_biguint64array_dispatch_call (const ecma_value_t *arguments_list_p,
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("BigUInt64Array cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor BigUInt64Array requires 'new'"));
} /* ecma_builtin_biguint64array_dispatch_call */
/**
@@ -53,7 +53,7 @@ ecma_builtin_float32array_dispatch_call (const ecma_value_t *arguments_list_p, /
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Float32Array cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Float32Array requires 'new'"));
} /* ecma_builtin_float32array_dispatch_call */
/**
@@ -54,7 +54,7 @@ ecma_builtin_float64array_dispatch_call (const ecma_value_t *arguments_list_p, /
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Float64Array cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Float64Array requires 'new'"));
} /* ecma_builtin_float64array_dispatch_call */
/**
@@ -53,7 +53,7 @@ ecma_builtin_int16array_dispatch_call (const ecma_value_t *arguments_list_p, /**
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Int16Array cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Int16Array requires 'new'"));
} /* ecma_builtin_int16array_dispatch_call */
/**
@@ -53,7 +53,7 @@ ecma_builtin_int32array_dispatch_call (const ecma_value_t *arguments_list_p, /**
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Int32Array cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Int32Array requires 'new'"));
} /* ecma_builtin_int32array_dispatch_call */
/**
@@ -53,7 +53,7 @@ ecma_builtin_int8array_dispatch_call (const ecma_value_t *arguments_list_p, /**<
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Int8Array cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Int8Array requires 'new'"));
} /* ecma_builtin_int8array_dispatch_call */
/**
@@ -275,7 +275,7 @@ ecma_builtin_typedarray_prototype_reduce_with_direction (ecma_value_t this_arg,
{
if (arguments_number < 2)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Initial value cannot be undefined."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Initial value cannot be undefined"));
}
return ecma_copy_value (arguments_list_p[1]);
@@ -511,7 +511,7 @@ ecma_op_typedarray_set_with_typedarray (ecma_value_t this_arg, /**< this argumen
ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (target_typedarray_p);
if (ecma_arraybuffer_is_detached (arraybuffer_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached"));
}
ecma_typedarray_info_t target_info = ecma_typedarray_get_info (target_typedarray_p);
@@ -520,7 +520,7 @@ ecma_op_typedarray_set_with_typedarray (ecma_value_t this_arg, /**< this argumen
ecma_object_t *src_arraybuffer_p = ecma_typedarray_get_arraybuffer (src_typedarray_p);
if (ecma_arraybuffer_is_detached (src_arraybuffer_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached"));
}
ecma_typedarray_info_t src_info = ecma_typedarray_get_info (src_typedarray_p);
@@ -614,7 +614,7 @@ ecma_builtin_typedarray_prototype_set (ecma_value_t this_arg, /**< this argument
ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (typedarray_p);
if (ecma_arraybuffer_is_detached (arraybuffer_p))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached"));
}
ecma_typedarray_info_t target_info = ecma_typedarray_get_info (typedarray_p);
@@ -1710,7 +1710,7 @@ ecma_builtin_typedarray_prototype_dispatch_routine (uint8_t builtin_routine_id,
return ECMA_VALUE_UNDEFINED;
}
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a TypedArray."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a TypedArray"));
}
ecma_object_t *typedarray_p = ecma_get_object_from_value (this_arg);
@@ -1723,13 +1723,13 @@ ecma_builtin_typedarray_prototype_dispatch_routine (uint8_t builtin_routine_id,
if (ecma_arraybuffer_is_detached (info.array_buffer_p)
&& builtin_routine_id != ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_SUBARRAY)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached"));
}
}
if (builtin_routine_id < ECMA_TYPEDARRAY_PROTOTYPE_ROUTINE_INDEX_OF && !ecma_op_is_callable (arguments_list_p[0]))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable"));
}
switch (builtin_routine_id)
@@ -1796,7 +1796,7 @@ ecma_builtin_typedarray_prototype_dispatch_routine (uint8_t builtin_routine_id,
{
if (!ecma_is_value_undefined (arguments_list_p[0]) && !ecma_op_is_callable (arguments_list_p[0]))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable"));
}
return ecma_builtin_typedarray_prototype_sort (this_arg, &info, arguments_list_p[0]);
@@ -62,7 +62,7 @@ ecma_builtin_typedarray_from (ecma_value_t this_arg, /**< 'this' argument */
if (!ecma_is_constructor (this_arg))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a constructor."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a constructor"));
}
ecma_value_t source;
@@ -71,7 +71,7 @@ ecma_builtin_typedarray_from (ecma_value_t this_arg, /**< 'this' argument */
if (arguments_list_len == 0)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("no source argument"));
return ecma_raise_type_error (ECMA_ERR_MSG ("No source argument"));
}
source = arguments_list_p[0];
@@ -82,7 +82,7 @@ ecma_builtin_typedarray_from (ecma_value_t this_arg, /**< 'this' argument */
if (!ecma_op_is_callable (map_fn))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("mapfn argument is not callable"));
return ecma_raise_type_error (ECMA_ERR_MSG ("The 'mapfn' argument is not callable"));
}
if (arguments_list_len > 2)
@@ -96,7 +96,7 @@ ecma_builtin_typedarray_from (ecma_value_t this_arg, /**< 'this' argument */
const uint8_t builtin_id = ecma_get_object_builtin_id (obj_p);
if (!ecma_typedarray_helper_is_typedarray (builtin_id))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a typedarray constructor"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a TypedArray constructor"));
}
ecma_typedarray_type_t typedarray_id = ecma_typedarray_helper_builtin_to_typedarray_id (builtin_id);
@@ -129,7 +129,7 @@ ecma_builtin_typedarray_of (ecma_value_t this_arg, /**< 'this' argument */
{
if (!ecma_is_constructor (this_arg))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a constructor."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a constructor"));
}
ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);
@@ -137,7 +137,7 @@ ecma_builtin_typedarray_of (ecma_value_t this_arg, /**< 'this' argument */
if (!ecma_typedarray_helper_is_typedarray (builtin_id))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a typedarray constructor"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument 'this' is not a TypedArray constructor"));
}
ecma_typedarray_type_t typedarray_id = ecma_typedarray_helper_builtin_to_typedarray_id (builtin_id);
@@ -53,7 +53,7 @@ ecma_builtin_uint16array_dispatch_call (const ecma_value_t *arguments_list_p, /*
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Uint16Array cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Uint16Array requires 'new'"));
} /* ecma_builtin_uint16array_dispatch_call */
/**
@@ -53,7 +53,7 @@ ecma_builtin_uint32array_dispatch_call (const ecma_value_t *arguments_list_p, /*
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Uint32Array cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Uint32Array requires 'new'"));
} /* ecma_builtin_uint32array_dispatch_call */
/**
@@ -53,7 +53,7 @@ ecma_builtin_uint8array_dispatch_call (const ecma_value_t *arguments_list_p, /**
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Uint8Array cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Uint8Array requires 'new'"));
} /* ecma_builtin_uint8array_dispatch_call */
/**
@@ -53,7 +53,7 @@ ecma_builtin_uint8clampedarray_dispatch_call (const ecma_value_t *arguments_list
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
return ecma_raise_type_error (ECMA_ERR_MSG ("Uint8ClampedArray cannot be directly called"));
return ecma_raise_type_error (ECMA_ERR_MSG ("Constructor Uint8ClampedArray requires 'new'"));
} /* ecma_builtin_uint8clampedarray_dispatch_call */
/**