Add constant error messages (#4640)
added two new file ecma-errors.h and ecma-erros.c it contains the most used errors messages. JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
This commit is contained in:
@@ -173,7 +173,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 ("Invalid Array length"));
|
||||
ecma_raise_range_error (ECMA_ERR_MSG (ecma_error_invalid_array_length));
|
||||
return NULL;
|
||||
}
|
||||
#endif /* JERRY_ESNEXT */
|
||||
@@ -996,7 +996,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 ("Invalid Array length"));
|
||||
return ecma_raise_range_error (ECMA_ERR_MSG (ecma_error_invalid_array_length));
|
||||
}
|
||||
|
||||
/* Only the writable and data properties can be modified. */
|
||||
|
||||
Reference in New Issue
Block a user