Outsource magic error messages (#4821)

Modify tools/gen-magic-strings.py to generate error messages.

JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi repasics@inf.u-szeged.hu
This commit is contained in:
Csaba Repasi
2021-11-25 14:06:40 +01:00
committed by GitHub
parent fc4168f2b4
commit 271d9b2463
111 changed files with 1947 additions and 925 deletions
@@ -172,7 +172,7 @@ ecma_op_new_array_object_from_length (ecma_length_t length) /**< length of the n
#if JERRY_ESNEXT
if (length > UINT32_MAX)
{
ecma_raise_range_error (ECMA_ERR_MSG (ecma_error_invalid_array_length));
ecma_raise_range_error (ECMA_ERR_INVALID_ARRAY_LENGTH);
return NULL;
}
#endif /* JERRY_ESNEXT */
@@ -757,7 +757,7 @@ ecma_op_array_species_create (ecma_object_t *original_array_p, /**< The object f
if (!ecma_is_constructor (constructor))
{
ecma_free_value (constructor);
ecma_raise_type_error (ECMA_ERR_MSG ("Invalid species constructor"));
ecma_raise_type_error (ECMA_ERR_INVALID_SPECIES_CONSTRUCTOR);
return NULL;
}
@@ -997,7 +997,7 @@ ecma_op_array_object_set_length (ecma_object_t *object_p, /**< the array object
if (((ecma_number_t) new_len_uint32) != new_len_num)
{
return ecma_raise_range_error (ECMA_ERR_MSG (ecma_error_invalid_array_length));
return ecma_raise_range_error (ECMA_ERR_INVALID_ARRAY_LENGTH);
}
/* Only the writable and data properties can be modified. */