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:
@@ -144,7 +144,7 @@ snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< compiled
|
||||
size_t snapshot_buffer_size, /**< snapshot buffer size */
|
||||
snapshot_globals_t *globals_p) /**< snapshot globals */
|
||||
{
|
||||
const jerry_char_t *error_buffer_too_small_p = (const jerry_char_t *) "Snapshot buffer too small.";
|
||||
const jerry_char_t *error_buffer_too_small_p = (const jerry_char_t *) "Snapshot buffer too small";
|
||||
|
||||
if (!ecma_is_value_empty (globals_p->snapshot_error))
|
||||
{
|
||||
@@ -155,7 +155,7 @@ snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< compiled
|
||||
|
||||
if (globals_p->snapshot_buffer_write_offset > JERRY_SNAPSHOT_MAXIMUM_WRITE_OFFSET)
|
||||
{
|
||||
const char * const error_message_p = "Maximum snapshot size reached.";
|
||||
const char * const error_message_p = "Maximum snapshot size reached";
|
||||
globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);
|
||||
return 0;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< compiled
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
if (compiled_code_p->status_flags & CBC_CODE_FLAGS_HAS_TAGGED_LITERALS)
|
||||
{
|
||||
const char * const error_message_p = "Unsupported feature: tagged template literals.";
|
||||
const char * const error_message_p = "Unsupported feature: tagged template literals";
|
||||
globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);
|
||||
return 0;
|
||||
}
|
||||
@@ -340,7 +340,7 @@ static_snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< c
|
||||
|
||||
if (globals_p->snapshot_buffer_write_offset >= JERRY_SNAPSHOT_MAXIMUM_WRITE_OFFSET)
|
||||
{
|
||||
const char * const error_message_p = "Maximum snapshot size reached.";
|
||||
const char * const error_message_p = "Maximum snapshot size reached";
|
||||
globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);
|
||||
return 0;
|
||||
}
|
||||
@@ -355,7 +355,7 @@ static_snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< c
|
||||
if (!CBC_IS_FUNCTION (compiled_code_p->status_flags))
|
||||
{
|
||||
/* Regular expression literals are not supported. */
|
||||
const char * const error_message_p = "Regular expression literals are not supported.";
|
||||
const char * const error_message_p = "Regular expression literals are not supported";
|
||||
globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);
|
||||
return 0;
|
||||
}
|
||||
@@ -366,7 +366,7 @@ static_snapshot_add_compiled_code (ecma_compiled_code_t *compiled_code_p, /**< c
|
||||
compiled_code_p,
|
||||
((size_t) compiled_code_p->size) << JMEM_ALIGNMENT_LOG))
|
||||
{
|
||||
const char * const error_message_p = "Snapshot buffer too small.";
|
||||
const char * const error_message_p = "Snapshot buffer too small";
|
||||
globals_p->snapshot_error = jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);
|
||||
return 0;
|
||||
}
|
||||
@@ -844,7 +844,7 @@ jerry_generate_snapshot_with_args (const jerry_char_t *resource_name_p, /**< scr
|
||||
&literals_num))
|
||||
{
|
||||
JERRY_ASSERT (lit_map_p == NULL);
|
||||
const char * const error_message_p = "Cannot allocate memory for literals.";
|
||||
const char * const error_message_p = "Cannot allocate memory for literals";
|
||||
ecma_bytecode_deref (bytecode_data_p);
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) error_message_p);
|
||||
}
|
||||
@@ -896,7 +896,7 @@ jerry_generate_snapshot (const jerry_char_t *resource_name_p, /**< script resour
|
||||
|
||||
if ((generate_snapshot_opts & ~(allowed_opts)) != 0)
|
||||
{
|
||||
const char * const error_message_p = "Unsupported generate snapshot flags specified.";
|
||||
const char * const error_message_p = "Unsupported generate snapshot flags specified";
|
||||
return jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);
|
||||
}
|
||||
|
||||
@@ -918,7 +918,7 @@ jerry_generate_snapshot (const jerry_char_t *resource_name_p, /**< script resour
|
||||
JERRY_UNUSED (buffer_p);
|
||||
JERRY_UNUSED (buffer_size);
|
||||
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot save is not supported.");
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot save is not supported");
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
} /* jerry_generate_snapshot */
|
||||
|
||||
@@ -945,7 +945,7 @@ jerry_snapshot_result (const uint32_t *snapshot_p, /**< snapshot */
|
||||
|
||||
if ((exec_snapshot_opts & ~(allowed_opts)) != 0)
|
||||
{
|
||||
ecma_raise_range_error (ECMA_ERR_MSG ("Unsupported exec snapshot flags specified."));
|
||||
ecma_raise_range_error (ECMA_ERR_MSG ("Unsupported snapshot exec flags are specified"));
|
||||
return ecma_create_error_reference_from_context ();
|
||||
}
|
||||
|
||||
@@ -990,7 +990,7 @@ jerry_snapshot_result (const uint32_t *snapshot_p, /**< snapshot */
|
||||
{
|
||||
if (!(exec_snapshot_opts & JERRY_SNAPSHOT_EXEC_ALLOW_STATIC))
|
||||
{
|
||||
ecma_raise_common_error (ECMA_ERR_MSG ("Static snapshots not allowed"));
|
||||
ecma_raise_common_error (ECMA_ERR_MSG ("Static snapshots are not enabled"));
|
||||
return ecma_create_error_reference_from_context ();
|
||||
}
|
||||
|
||||
@@ -1088,7 +1088,7 @@ jerry_exec_snapshot (const uint32_t *snapshot_p, /**< snapshot */
|
||||
JERRY_UNUSED (func_index);
|
||||
JERRY_UNUSED (exec_snapshot_opts);
|
||||
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot execution is not supported.");
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot execution is not supported");
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
} /* jerry_exec_snapshot */
|
||||
|
||||
@@ -1821,7 +1821,7 @@ jerry_generate_function_snapshot (const jerry_char_t *resource_name_p, /**< scri
|
||||
|
||||
if ((generate_snapshot_opts & ~(allowed_opts)) != 0)
|
||||
{
|
||||
const char * const error_message_p = "Unsupported generate snapshot flags specified.";
|
||||
const char * const error_message_p = "Unsupported generate snapshot flags specified";
|
||||
return jerry_create_error (JERRY_ERROR_RANGE, (const jerry_char_t *) error_message_p);
|
||||
}
|
||||
|
||||
@@ -1845,7 +1845,7 @@ jerry_generate_function_snapshot (const jerry_char_t *resource_name_p, /**< scri
|
||||
JERRY_UNUSED (buffer_p);
|
||||
JERRY_UNUSED (buffer_size);
|
||||
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot save is not supported.");
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot save is not supported");
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_SAVE) */
|
||||
} /* jerry_generate_function_snapshot */
|
||||
|
||||
@@ -1872,6 +1872,6 @@ jerry_load_function_snapshot (const uint32_t *function_snapshot_p, /**< snapshot
|
||||
JERRY_UNUSED (func_index);
|
||||
JERRY_UNUSED (exec_snapshot_opts);
|
||||
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot execution is not supported.");
|
||||
return jerry_create_error (JERRY_ERROR_COMMON, (const jerry_char_t *) "Snapshot execution is not supported");
|
||||
#endif /* ENABLED (JERRY_SNAPSHOT_EXEC) */
|
||||
} /* jerry_load_function_snapshot */
|
||||
|
||||
+78
-38
@@ -106,20 +106,60 @@ JERRY_STATIC_ASSERT (((NUMBER_ARITHMETIC_SUBTRACTION + ECMA_NUMBER_ARITHMETIC_OP
|
||||
/**
|
||||
* Error message, if an argument is has an error flag
|
||||
*/
|
||||
static const char * const error_value_msg_p = "argument cannot have an error flag";
|
||||
static const char * const error_value_msg_p = "Argument cannot be marked as error";
|
||||
|
||||
/**
|
||||
* Error message, if types of arguments are incorrect
|
||||
* Error message, if an argument has a wrong type
|
||||
*/
|
||||
static const char * const wrong_args_msg_p = "wrong type of argument";
|
||||
static const char * const wrong_args_msg_p = "This type of argument is not allowed";
|
||||
|
||||
#if !ENABLED (JERRY_PARSER)
|
||||
/**
|
||||
* Error message, if parsing is disabled
|
||||
*/
|
||||
static const char * const error_parser_not_supported_p = "Source code parsing is disabled";
|
||||
#endif /* !ENABLED (JERRY_PARSER) */
|
||||
|
||||
#if !ENABLED (JERRY_BUILTIN_JSON)
|
||||
/**
|
||||
* Error message, if JSON support is disabled
|
||||
*/
|
||||
static const char * const error_json_not_supported_p = "JSON support is disabled";
|
||||
#endif /* !ENABLED (JERRY_BUILTIN_JSON) */
|
||||
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
/**
|
||||
* Error message, if Symbol support is disabled
|
||||
*/
|
||||
static const char * const error_symbol_not_supported_p = "Symbol support is disabled";
|
||||
#endif /* !ENABLED (JERRY_ESNEXT) */
|
||||
|
||||
#if !ENABLED (JERRY_BUILTIN_PROMISE)
|
||||
/**
|
||||
* Error message, if Promise support is disabled
|
||||
*/
|
||||
static const char * const error_promise_not_supported_p = "Promise support is disabled";
|
||||
#endif /* !ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
|
||||
#if !ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
/**
|
||||
* Error message, if TypedArray support is disabled
|
||||
*/
|
||||
static const char * const error_typed_array_not_supported_p = "TypedArray support is disabled";
|
||||
#endif /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
|
||||
#if !ENABLED (JERRY_BUILTIN_DATAVIEW)
|
||||
/**
|
||||
* Error message, if DataView support is disabled
|
||||
*/
|
||||
static const char * const error_data_view_not_supported_p = "DataView support is disabled";
|
||||
#endif /* !ENABLED (JERRY_BUILTIN_DATAVIEW) */
|
||||
|
||||
#if !ENABLED (JERRY_BUILTIN_BIGINT)
|
||||
|
||||
/**
|
||||
* Error message, if BigInt support is disabled
|
||||
*/
|
||||
static const char * const error_bigint_not_supported_p = "BigInt support is disabled";
|
||||
|
||||
#endif /* !ENABLED (JERRY_BUILTIN_BIGINT) */
|
||||
|
||||
#endif /* ENABLED (JERRY_ERROR_MESSAGES) */
|
||||
@@ -457,7 +497,7 @@ jerry_parse (const jerry_char_t *resource_name_p, /**< resource name (usually a
|
||||
#if ENABLED (JERRY_MODULE_SYSTEM)
|
||||
ecma_module_initialize_context (ecma_get_string_from_value (resource_name));
|
||||
#else /* !ENABLED (JERRY_MODULE_SYSTEM) */
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("Module system has been disabled.")));
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("Module system has been disabled")));
|
||||
#endif /* !ENABLED (JERRY_MODULE_SYSTEM) */
|
||||
}
|
||||
|
||||
@@ -527,7 +567,7 @@ jerry_parse (const jerry_char_t *resource_name_p, /**< resource name (usually a
|
||||
JERRY_UNUSED (source_size);
|
||||
JERRY_UNUSED (parse_opts);
|
||||
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("The parser has been disabled.")));
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (error_parser_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_PARSER) */
|
||||
} /* jerry_parse */
|
||||
|
||||
@@ -608,7 +648,7 @@ jerry_parse_function (const jerry_char_t *resource_name_p, /**< resource name (u
|
||||
JERRY_UNUSED (source_size);
|
||||
JERRY_UNUSED (parse_opts);
|
||||
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("The parser has been disabled.")));
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (error_parser_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_PARSER) */
|
||||
} /* jerry_parse_function */
|
||||
|
||||
@@ -2156,7 +2196,7 @@ jerry_create_promise (void)
|
||||
JERRY_CONTEXT (current_new_target_p) = old_new_target_p;
|
||||
return promise_value;
|
||||
#else /* !ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Promise not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_promise_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
} /* jerry_create_promise */
|
||||
|
||||
@@ -2184,7 +2224,7 @@ jerry_create_proxy (const jerry_value_t target, /**< target argument */
|
||||
ecma_object_t *proxy_p = ecma_proxy_create (target, handler);
|
||||
return jerry_return (proxy_p == NULL ? ECMA_VALUE_ERROR : ecma_make_object_value (proxy_p));
|
||||
#else /* !ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Proxy is not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Proxy is not supported")));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROXY) */
|
||||
} /* jerry_create_proxy */
|
||||
|
||||
@@ -2314,7 +2354,7 @@ jerry_create_symbol (const jerry_value_t value) /**< api value */
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
return jerry_return (ecma_op_create_symbol (&value, 1));
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Symbol is not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_symbol_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
} /* jerry_create_symbol */
|
||||
|
||||
@@ -2392,7 +2432,7 @@ jerry_create_regexp_sz (const jerry_char_t *pattern_p, /**< zero-terminated UTF-
|
||||
JERRY_UNUSED (pattern_size);
|
||||
JERRY_UNUSED (flags);
|
||||
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("RegExp is not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("RegExp is not supported")));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
} /* jerry_create_regexp_sz */
|
||||
|
||||
@@ -2410,7 +2450,7 @@ jerry_create_realm (void)
|
||||
ecma_global_object_t *global_object_p = ecma_builtin_create_global_object ();
|
||||
return ecma_make_object_value ((ecma_object_t *) global_object_p);
|
||||
#else /* !ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Realms are disabled.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Realms are disabled")));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REALMS) */
|
||||
} /* jerry_create_realm */
|
||||
|
||||
@@ -4205,7 +4245,7 @@ jerry_resolve_or_reject_promise (jerry_value_t promise, /**< the promise value *
|
||||
JERRY_UNUSED (argument);
|
||||
JERRY_UNUSED (is_resolve);
|
||||
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Promise not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_promise_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
} /* jerry_resolve_or_reject_promise */
|
||||
|
||||
@@ -4229,7 +4269,7 @@ jerry_get_promise_result (const jerry_value_t promise) /**< promise object to ge
|
||||
return ecma_promise_get_result (ecma_get_object_from_value (promise));
|
||||
#else /* !ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
JERRY_UNUSED (promise);
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Promise not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_promise_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_PROMISE) */
|
||||
} /* jerry_get_promise_result */
|
||||
|
||||
@@ -4316,7 +4356,7 @@ jerry_get_symbol_description (const jerry_value_t symbol) /**< symbol value */
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
JERRY_UNUSED (symbol);
|
||||
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Symbol is not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_symbol_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
} /* jerry_get_symbol_description */
|
||||
|
||||
@@ -4345,7 +4385,7 @@ jerry_get_symbol_descriptive_string (const jerry_value_t symbol) /**< symbol val
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
JERRY_UNUSED (symbol);
|
||||
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Symbol is not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_symbol_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
} /** jerry_get_symbol_descriptive_string */
|
||||
|
||||
@@ -4880,7 +4920,7 @@ jerry_create_arraybuffer (const jerry_length_t size) /**< size of the ArrayBuffe
|
||||
return jerry_return (ecma_make_object_value (ecma_arraybuffer_new_object (size)));
|
||||
#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
JERRY_UNUSED (size);
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_typed_array_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
} /* jerry_create_arraybuffer */
|
||||
|
||||
@@ -4921,7 +4961,7 @@ jerry_create_arraybuffer_external (const jerry_length_t size, /**< size of the b
|
||||
JERRY_UNUSED (size);
|
||||
JERRY_UNUSED (buffer_p);
|
||||
JERRY_UNUSED (free_cb);
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_typed_array_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
} /* jerry_create_arraybuffer_external */
|
||||
|
||||
@@ -5127,7 +5167,7 @@ jerry_detach_arraybuffer (const jerry_value_t value) /**< ArrayBuffer */
|
||||
{
|
||||
return ECMA_VALUE_NULL;
|
||||
}
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has already been detached.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has already been detached")));
|
||||
}
|
||||
#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
JERRY_UNUSED (value);
|
||||
@@ -5181,8 +5221,8 @@ jerry_create_dataview (const jerry_value_t array_buffer, /**< arraybuffer to cre
|
||||
JERRY_UNUSED (array_buffer);
|
||||
JERRY_UNUSED (byte_offset);
|
||||
JERRY_UNUSED (byte_length);
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("DataView is not supported.")));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_data_view_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */
|
||||
} /* jerry_create_dataview */
|
||||
|
||||
/**
|
||||
@@ -5201,7 +5241,7 @@ jerry_value_is_dataview (const jerry_value_t value) /**< value to check if it is
|
||||
#else /* !ENABLED (JERRY_BUILTIN_DATAVIEW) */
|
||||
JERRY_UNUSED (value);
|
||||
return false;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */
|
||||
} /* jerry_value_is_dataview */
|
||||
|
||||
/**
|
||||
@@ -5254,8 +5294,8 @@ jerry_get_dataview_buffer (const jerry_value_t value, /**< DataView to get the a
|
||||
JERRY_UNUSED (value);
|
||||
JERRY_UNUSED (byte_offset);
|
||||
JERRY_UNUSED (byte_length);
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("DataView is not supported.")));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW */
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_data_view_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_DATAVIEW) */
|
||||
} /* jerry_get_dataview_buffer */
|
||||
|
||||
/**
|
||||
@@ -5376,7 +5416,7 @@ jerry_create_typedarray (jerry_typedarray_type_t type_name, /**< type of TypedAr
|
||||
|
||||
if (!jerry_typedarray_find_by_type (type_name, &prototype_id, &id, &element_size_shift))
|
||||
{
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("incorrect type for TypedArray.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Incorrect type for TypedArray")));
|
||||
}
|
||||
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (prototype_id);
|
||||
@@ -5393,7 +5433,7 @@ jerry_create_typedarray (jerry_typedarray_type_t type_name, /**< type of TypedAr
|
||||
#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
JERRY_UNUSED (type_name);
|
||||
JERRY_UNUSED (length);
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("TypedArray not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_typed_array_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
} /* jerry_create_typedarray */
|
||||
|
||||
@@ -5426,7 +5466,7 @@ jerry_create_typedarray_for_arraybuffer_sz (jerry_typedarray_type_t type_name, /
|
||||
|
||||
if (!jerry_typedarray_find_by_type (type_name, &prototype_id, &id, &element_size_shift))
|
||||
{
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("incorrect type for TypedArray.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Incorrect type for TypedArray")));
|
||||
}
|
||||
|
||||
if (!ecma_is_arraybuffer (arraybuffer))
|
||||
@@ -5452,7 +5492,7 @@ jerry_create_typedarray_for_arraybuffer_sz (jerry_typedarray_type_t type_name, /
|
||||
JERRY_UNUSED (arraybuffer);
|
||||
JERRY_UNUSED (byte_offset);
|
||||
JERRY_UNUSED (length);
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("TypedArray not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_typed_array_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
} /* jerry_create_typedarray_for_arraybuffer_sz */
|
||||
|
||||
@@ -5482,7 +5522,7 @@ jerry_create_typedarray_for_arraybuffer (jerry_typedarray_type_t type_name, /**<
|
||||
#else /* !ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
JERRY_UNUSED (type_name);
|
||||
JERRY_UNUSED (arraybuffer);
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("TypedArray not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_typed_array_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
} /* jerry_create_typedarray_for_arraybuffer */
|
||||
|
||||
@@ -5565,7 +5605,7 @@ jerry_get_typedarray_buffer (jerry_value_t value, /**< TypedArray to get the arr
|
||||
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
|
||||
if (!ecma_is_typedarray (value))
|
||||
{
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Object is not a TypedArray.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Object is not a TypedArray")));
|
||||
}
|
||||
|
||||
ecma_object_t *array_p = ecma_get_object_from_value (value);
|
||||
@@ -5588,7 +5628,7 @@ jerry_get_typedarray_buffer (jerry_value_t value, /**< TypedArray to get the arr
|
||||
JERRY_UNUSED (value);
|
||||
JERRY_UNUSED (byte_length);
|
||||
JERRY_UNUSED (byte_offset);
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("TypedArray is not supported.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG (error_typed_array_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_TYPEDARRAY) */
|
||||
} /* jerry_get_typedarray_buffer */
|
||||
|
||||
@@ -5614,7 +5654,7 @@ jerry_json_parse (const jerry_char_t *string_p, /**< json string */
|
||||
|
||||
if (ecma_is_value_undefined (ret_value))
|
||||
{
|
||||
ret_value = jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("JSON string parse error.")));
|
||||
ret_value = jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("JSON string parse error")));
|
||||
}
|
||||
|
||||
return jerry_return (ret_value);
|
||||
@@ -5622,7 +5662,7 @@ jerry_json_parse (const jerry_char_t *string_p, /**< json string */
|
||||
JERRY_UNUSED (string_p);
|
||||
JERRY_UNUSED (string_size);
|
||||
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("The JSON has been disabled.")));
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (error_json_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
|
||||
} /* jerry_json_parse */
|
||||
|
||||
@@ -5651,14 +5691,14 @@ jerry_json_stringify (const jerry_value_t input_value) /**< a value to stringify
|
||||
|
||||
if (ecma_is_value_undefined (ret_value))
|
||||
{
|
||||
ret_value = jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("JSON stringify error.")));
|
||||
ret_value = jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("JSON stringify error")));
|
||||
}
|
||||
|
||||
return jerry_return (ret_value);
|
||||
#else /* ENABLED (JERRY_BUILTIN_JSON) */
|
||||
JERRY_UNUSED (input_value);
|
||||
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("The JSON has been disabled.")));
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG (error_json_not_supported_p)));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
|
||||
} /* jerry_json_stringify */
|
||||
|
||||
@@ -5731,7 +5771,7 @@ jerry_create_container (jerry_container_type_t container_type, /**< Type of the
|
||||
#endif /* ENABLED (JERRY_BUILTIN_WEAKSET) */
|
||||
default:
|
||||
{
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Invalid container type.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Invalid container type")));
|
||||
}
|
||||
}
|
||||
ecma_object_t * old_new_target_p = JERRY_CONTEXT (current_new_target_p);
|
||||
@@ -5752,7 +5792,7 @@ jerry_create_container (jerry_container_type_t container_type, /**< Type of the
|
||||
JERRY_UNUSED (arguments_list_p);
|
||||
JERRY_UNUSED (arguments_list_len);
|
||||
JERRY_UNUSED (container_type);
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Containers are disabled.")));
|
||||
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Containers are disabled")));
|
||||
#endif /* ENABLED (JERRY_BUILTIN_CONTAINER) */
|
||||
} /* jerry_create_container */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user