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
+1 -1
View File
@@ -304,7 +304,7 @@ opfunc_unary_operation (ecma_value_t left_value, /**< left value */
if (is_plus)
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Unary operation plus is not allowed for BigInt numbers"));
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Unary plus is not allowed for BigInts"));
}
else
{
@@ -106,7 +106,7 @@ opfunc_instanceof (ecma_value_t left_value, /**< left value */
{
if (!ecma_is_value_object (right_value))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Expected an object in 'instanceof' check."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Right value of 'instanceof' must be an object"));
}
#if ENABLED (JERRY_ESNEXT)
@@ -155,7 +155,7 @@ opfunc_in (ecma_value_t left_value, /**< left value */
{
if (!ecma_is_value_object (right_value))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Expected an object in 'in' check."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Right value of 'in' must be an object"));
}
ecma_string_t *property_name_p = ecma_op_to_property_key (left_value);
+5 -5
View File
@@ -218,7 +218,7 @@ vm_op_delete_prop (ecma_value_t object, /**< base object */
#if ENABLED (JERRY_ESNEXT)
if (is_strict && ecma_is_value_false (delete_op_ret))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("delete returned false in strict mode."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Operator delete returned false in strict mode"));
}
#endif /* ENABLED (JERRY_ESNEXT) */
@@ -1068,7 +1068,7 @@ ecma_op_implicit_constructor_handler_cb (const ecma_value_t function_obj, /**< t
if (JERRY_CONTEXT (current_new_target_p) == NULL)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Class constructor cannot be invoked without 'new'."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Class constructor cannot be invoked without 'new'"));
}
return opfunc_init_class_fields (function_obj, this_val);
@@ -1092,7 +1092,7 @@ ecma_op_implicit_constructor_handler_heritage_cb (const ecma_value_t function_ob
if (JERRY_CONTEXT (current_new_target_p) == NULL)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Class constructor cannot be invoked without 'new'."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Class constructor cannot be invoked without 'new'"));
}
ecma_object_t *func_obj_p = ecma_get_object_from_value (function_obj);
@@ -1489,7 +1489,7 @@ opfunc_form_super_reference (ecma_value_t **vm_stack_top_p, /**< current vm stac
if (!ecma_op_this_binding_is_initialized (environment_record_p))
{
return ecma_raise_reference_error (ECMA_ERR_MSG ("Must call super constructor in derived class before "
"accessing 'this' or returning from it."));
"accessing 'this' or returning from it"));
}
}
@@ -1497,7 +1497,7 @@ opfunc_form_super_reference (ecma_value_t **vm_stack_top_p, /**< current vm stac
if (ECMA_IS_VALUE_ERROR (parent))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Cannot invoke nullable super method."));
return ecma_raise_type_error (ECMA_ERR_MSG ("Cannot invoke nullable super method"));
}
if (!ecma_op_require_object_coercible (parent))
+2 -2
View File
@@ -331,7 +331,7 @@ vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
if (!ecma_is_value_object (result) || !ecma_op_is_callable (result))
{
ecma_free_value (result);
result = ecma_raise_type_error (ECMA_ERR_MSG ("Iterator return() is not callable"));
result = ecma_raise_type_error (ECMA_ERR_MSG ("Iterator 'return' is not callable"));
}
else
{
@@ -378,7 +378,7 @@ vm_stack_find_finally (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
if (!is_object)
{
result = ecma_raise_type_error (ECMA_ERR_MSG ("Iterator return() result is not object"));
result = ecma_raise_type_error (ECMA_ERR_MSG ("Iterator 'return' result is not object"));
}
}
}
+10 -10
View File
@@ -583,7 +583,7 @@ vm_super_call (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (!ecma_is_constructor (func_value))
{
completion_value = ecma_raise_type_error (ECMA_ERR_MSG ("Class extends value is not a constructor."));
completion_value = ecma_raise_type_error (ECMA_ERR_MSG ("Value for class heritage is not a constructor"));
}
else
{
@@ -699,7 +699,7 @@ vm_spread_operation (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (!ecma_is_value_object (func_value)
|| !ecma_op_object_is_callable (ecma_get_object_from_value (func_value)))
{
completion_value = ecma_raise_type_error (ECMA_ERR_MSG ("Expected a function."));
completion_value = ecma_raise_type_error (ECMA_ERR_MSG ("Expected a function"));
}
else
{
@@ -783,7 +783,7 @@ opfunc_call (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (!ecma_is_value_object (func_value)
|| !ecma_op_object_is_callable (ecma_get_object_from_value (func_value)))
{
completion_value = ecma_raise_type_error (ECMA_ERR_MSG ("Expected a function."));
completion_value = ecma_raise_type_error (ECMA_ERR_MSG ("Expected a function"));
}
else
{
@@ -1635,7 +1635,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (binding_p != NULL)
{
result = ecma_raise_syntax_error (ECMA_ERR_MSG ("Local variable is redeclared."));
result = ecma_raise_syntax_error (ECMA_ERR_MSG ("Local variable is redeclared"));
goto error;
}
@@ -1663,7 +1663,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (binding_p != NULL)
{
result = ecma_raise_syntax_error (ECMA_ERR_MSG ("Local variable is redeclared."));
result = ecma_raise_syntax_error (ECMA_ERR_MSG ("Local variable is redeclared"));
goto error;
}
@@ -1678,7 +1678,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (ecma_is_value_true (result))
{
result = ecma_raise_syntax_error (ECMA_ERR_MSG ("Local variable is redeclared."));
result = ecma_raise_syntax_error (ECMA_ERR_MSG ("Local variable is redeclared"));
goto error;
}
@@ -1746,7 +1746,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
case VM_OC_THROW_CONST_ERROR:
{
result = ecma_raise_type_error (ECMA_ERR_MSG ("Constant bindings cannot be reassigned."));
result = ecma_raise_type_error (ECMA_ERR_MSG ("Constant bindings cannot be reassigned"));
goto error;
}
case VM_OC_COPY_TO_GLOBAL:
@@ -1939,7 +1939,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (JERRY_UNLIKELY (ecma_compare_ecma_string_to_magic_id (prop_name_p, LIT_MAGIC_STRING_PROTOTYPE))
&& !(opcode_data & VM_OC_NON_STATIC_FLAG))
{
result = ecma_raise_type_error (ECMA_ERR_MSG ("prototype property of a class is non-configurable"));
result = ecma_raise_type_error (ECMA_ERR_MSG ("Prototype property of a class is non-configurable"));
goto error;
}
@@ -1972,7 +1972,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (JERRY_UNLIKELY (ecma_compare_ecma_string_to_magic_id (prop_name_p, LIT_MAGIC_STRING_PROTOTYPE))
&& !(opcode_data & VM_OC_NON_STATIC_FLAG))
{
result = ecma_raise_type_error (ECMA_ERR_MSG ("prototype property of a class is non-configurable"));
result = ecma_raise_type_error (ECMA_ERR_MSG ("Prototype property of a class is non-configurable"));
goto error;
}
@@ -3051,7 +3051,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
case VM_OC_THROW_REFERENCE_ERROR:
{
result = ecma_raise_reference_error (ECMA_ERR_MSG ("Undefined reference."));
result = ecma_raise_reference_error (ECMA_ERR_MSG ("Undefined reference"));
goto error;
}
case VM_OC_EVAL: