]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Shared error message strings | |
3 | * | |
4 | * To minimize code footprint, try to share error messages inside Duktape | |
5 | * code. Modern compilers will do this automatically anyway, this is mostly | |
6 | * for older compilers. | |
7 | */ | |
8 | ||
9 | #include "duk_internal.h" | |
10 | ||
11 | /* Mostly API and built-in method related */ | |
12 | DUK_INTERNAL const char *duk_str_internal_error = "internal error"; | |
13 | DUK_INTERNAL const char *duk_str_invalid_count = "invalid count"; | |
14 | DUK_INTERNAL const char *duk_str_invalid_call_args = "invalid call args"; | |
15 | DUK_INTERNAL const char *duk_str_not_constructable = "not constructable"; | |
16 | DUK_INTERNAL const char *duk_str_not_callable = "not callable"; | |
17 | DUK_INTERNAL const char *duk_str_not_extensible = "not extensible"; | |
18 | DUK_INTERNAL const char *duk_str_not_writable = "not writable"; | |
19 | DUK_INTERNAL const char *duk_str_not_configurable = "not configurable"; | |
20 | ||
21 | DUK_INTERNAL const char *duk_str_invalid_context = "invalid context"; | |
22 | DUK_INTERNAL const char *duk_str_push_beyond_alloc_stack = "attempt to push beyond currently allocated stack"; | |
23 | DUK_INTERNAL const char *duk_str_not_buffer = "not buffer"; /* still in use with verbose messages */ | |
24 | DUK_INTERNAL const char *duk_str_unexpected_type = "unexpected type"; | |
25 | DUK_INTERNAL const char *duk_str_defaultvalue_coerce_failed = "[[DefaultValue]] coerce failed"; | |
26 | DUK_INTERNAL const char *duk_str_number_outside_range = "number outside range"; | |
27 | DUK_INTERNAL const char *duk_str_not_object_coercible = "not object coercible"; | |
28 | DUK_INTERNAL const char *duk_str_string_too_long = "string too long"; | |
29 | DUK_INTERNAL const char *duk_str_buffer_too_long = "buffer too long"; | |
30 | DUK_INTERNAL const char *duk_str_sprintf_too_long = "sprintf message too long"; | |
31 | DUK_INTERNAL const char *duk_str_alloc_failed = "alloc failed"; | |
32 | DUK_INTERNAL const char *duk_str_pop_too_many = "attempt to pop too many entries"; | |
33 | DUK_INTERNAL const char *duk_str_wrong_buffer_type = "wrong buffer type"; | |
34 | DUK_INTERNAL const char *duk_str_encode_failed = "encode failed"; | |
35 | DUK_INTERNAL const char *duk_str_decode_failed = "decode failed"; | |
36 | DUK_INTERNAL const char *duk_str_no_sourcecode = "no sourcecode"; | |
37 | DUK_INTERNAL const char *duk_str_concat_result_too_long = "concat result too long"; | |
38 | DUK_INTERNAL const char *duk_str_unimplemented = "unimplemented"; | |
39 | DUK_INTERNAL const char *duk_str_unsupported = "unsupported"; | |
40 | DUK_INTERNAL const char *duk_str_array_length_over_2g = "array length over 2G"; | |
41 | ||
42 | /* JSON */ | |
43 | DUK_INTERNAL const char *duk_str_fmt_ptr = "%p"; | |
44 | DUK_INTERNAL const char *duk_str_fmt_invalid_json = "invalid json (at offset %ld)"; | |
45 | DUK_INTERNAL const char *duk_str_jsondec_reclimit = "json decode recursion limit"; | |
46 | DUK_INTERNAL const char *duk_str_jsonenc_reclimit = "json encode recursion limit"; | |
47 | DUK_INTERNAL const char *duk_str_cyclic_input = "cyclic input"; | |
48 | ||
49 | /* Object property access */ | |
50 | DUK_INTERNAL const char *duk_str_proxy_revoked = "proxy revoked"; | |
51 | DUK_INTERNAL const char *duk_str_invalid_base = "invalid base value"; | |
52 | DUK_INTERNAL const char *duk_str_strict_caller_read = "attempt to read strict 'caller'"; | |
53 | DUK_INTERNAL const char *duk_str_proxy_rejected = "proxy rejected"; | |
54 | DUK_INTERNAL const char *duk_str_invalid_array_length = "invalid array length"; | |
55 | DUK_INTERNAL const char *duk_str_array_length_write_failed = "array length write failed"; | |
56 | DUK_INTERNAL const char *duk_str_array_length_not_writable = "array length non-writable"; | |
57 | DUK_INTERNAL const char *duk_str_setter_undefined = "setter undefined"; | |
58 | DUK_INTERNAL const char *duk_str_redefine_virt_prop = "attempt to redefine virtual property"; | |
59 | DUK_INTERNAL const char *duk_str_invalid_descriptor = "invalid descriptor"; | |
60 | DUK_INTERNAL const char *duk_str_property_is_virtual = "property is virtual"; | |
61 | ||
62 | /* Compiler */ | |
63 | DUK_INTERNAL const char *duk_str_parse_error = "parse error"; | |
64 | DUK_INTERNAL const char *duk_str_duplicate_label = "duplicate label"; | |
65 | DUK_INTERNAL const char *duk_str_invalid_label = "invalid label"; | |
66 | DUK_INTERNAL const char *duk_str_invalid_array_literal = "invalid array literal"; | |
67 | DUK_INTERNAL const char *duk_str_invalid_object_literal = "invalid object literal"; | |
68 | DUK_INTERNAL const char *duk_str_invalid_var_declaration = "invalid variable declaration"; | |
69 | DUK_INTERNAL const char *duk_str_cannot_delete_identifier = "cannot delete identifier"; | |
70 | DUK_INTERNAL const char *duk_str_invalid_expression = "invalid expression"; | |
71 | DUK_INTERNAL const char *duk_str_invalid_lvalue = "invalid lvalue"; | |
72 | DUK_INTERNAL const char *duk_str_expected_identifier = "expected identifier"; | |
73 | DUK_INTERNAL const char *duk_str_empty_expr_not_allowed = "empty expression not allowed"; | |
74 | DUK_INTERNAL const char *duk_str_invalid_for = "invalid for statement"; | |
75 | DUK_INTERNAL const char *duk_str_invalid_switch = "invalid switch statement"; | |
76 | DUK_INTERNAL const char *duk_str_invalid_break_cont_label = "invalid break/continue label"; | |
77 | DUK_INTERNAL const char *duk_str_invalid_return = "invalid return"; | |
78 | DUK_INTERNAL const char *duk_str_invalid_try = "invalid try"; | |
79 | DUK_INTERNAL const char *duk_str_invalid_throw = "invalid throw"; | |
80 | DUK_INTERNAL const char *duk_str_with_in_strict_mode = "with in strict mode"; | |
81 | DUK_INTERNAL const char *duk_str_func_stmt_not_allowed = "function statement not allowed"; | |
82 | DUK_INTERNAL const char *duk_str_unterminated_stmt = "unterminated statement"; | |
83 | DUK_INTERNAL const char *duk_str_invalid_arg_name = "invalid argument name"; | |
84 | DUK_INTERNAL const char *duk_str_invalid_func_name = "invalid function name"; | |
85 | DUK_INTERNAL const char *duk_str_invalid_getset_name = "invalid getter/setter name"; | |
86 | DUK_INTERNAL const char *duk_str_func_name_required = "function name required"; | |
87 | ||
88 | /* Regexp */ | |
89 | DUK_INTERNAL const char *duk_str_invalid_quantifier_no_atom = "quantifier without preceding atom"; | |
90 | DUK_INTERNAL const char *duk_str_invalid_quantifier_values = "quantifier values invalid (qmin > qmax)"; | |
91 | DUK_INTERNAL const char *duk_str_quantifier_too_many_copies = "quantifier expansion requires too many atom copies"; | |
92 | DUK_INTERNAL const char *duk_str_unexpected_closing_paren = "unexpected closing parenthesis"; | |
93 | DUK_INTERNAL const char *duk_str_unexpected_end_of_pattern = "unexpected end of pattern"; | |
94 | DUK_INTERNAL const char *duk_str_unexpected_regexp_token = "unexpected token in regexp"; | |
95 | DUK_INTERNAL const char *duk_str_invalid_regexp_flags = "invalid regexp flags"; | |
96 | DUK_INTERNAL const char *duk_str_invalid_backrefs = "invalid backreference(s)"; | |
97 | ||
98 | /* Limits */ | |
99 | DUK_INTERNAL const char *duk_str_valstack_limit = "valstack limit"; | |
100 | DUK_INTERNAL const char *duk_str_callstack_limit = "callstack limit"; | |
101 | DUK_INTERNAL const char *duk_str_catchstack_limit = "catchstack limit"; | |
102 | DUK_INTERNAL const char *duk_str_prototype_chain_limit = "prototype chain limit"; | |
103 | DUK_INTERNAL const char *duk_str_bound_chain_limit = "function call bound chain limit"; | |
104 | DUK_INTERNAL const char *duk_str_c_callstack_limit = "C call stack depth limit"; | |
105 | DUK_INTERNAL const char *duk_str_compiler_recursion_limit = "compiler recursion limit"; | |
106 | DUK_INTERNAL const char *duk_str_bytecode_limit = "bytecode limit"; | |
107 | DUK_INTERNAL const char *duk_str_reg_limit = "register limit"; | |
108 | DUK_INTERNAL const char *duk_str_temp_limit = "temp limit"; | |
109 | DUK_INTERNAL const char *duk_str_const_limit = "const limit"; | |
110 | DUK_INTERNAL const char *duk_str_func_limit = "function limit"; | |
111 | DUK_INTERNAL const char *duk_str_regexp_compiler_recursion_limit = "regexp compiler recursion limit"; | |
112 | DUK_INTERNAL const char *duk_str_regexp_executor_recursion_limit = "regexp executor recursion limit"; | |
113 | DUK_INTERNAL const char *duk_str_regexp_executor_step_limit = "regexp step limit"; | |
114 | ||
115 | /* Misc */ |