xref: /vim-8.2.3635/src/errors.h (revision dace9f78)
1 /* vi:set ts=8 sts=4 sw=4 noet:
2  *
3  * VIM - Vi IMproved	by Bram Moolenaar
4  *
5  * Do ":help uganda"  in Vim to read copying and usage conditions.
6  * Do ":help credits" in Vim to see a list of people who contributed.
7  */
8 
9 /*
10  * Definition of error messages, sorted on error number.
11  */
12 
13 #ifdef FEAT_EVAL
14 EXTERN char e_undefined_variable_str[]
15 	INIT(= N_("E121: Undefined variable: %s"));
16 EXTERN char e_undefined_variable_char_str[]
17 	INIT(= N_("E121: Undefined variable: %c:%s"));
18 #endif
19 EXTERN char e_invalid_command[]
20 	INIT(= N_("E476: Invalid command"));
21 #ifdef FEAT_EVAL
22 EXTERN char e_invalid_command_str[]
23 	INIT(= N_("E476: Invalid command: %s"));
24 EXTERN char e_list_value_has_more_items_than_targets[]
25 	INIT(= N_("E710: List value has more items than targets"));
26 EXTERN char e_list_value_does_not_have_enough_items[]
27 	INIT(= N_("E711: List value does not have enough items"));
28 EXTERN char e_cannot_slice_dictionary[]
29 	INIT(= N_("E719: Cannot slice a Dictionary"));
30 EXTERN char e_assert_fails_second_arg[]
31 	INIT(= N_("E856: \"assert_fails()\" second argument must be a string or a list with one or two strings"));
32 EXTERN char e_cannot_index_special_variable[]
33 	INIT(= N_("E909: Cannot index a special variable"));
34 EXTERN char e_missing_var_str[]
35 	INIT(= N_("E1100: Missing :var: %s"));
36 EXTERN char e_variable_not_found_str[]
37 	INIT(= N_("E1001: Variable not found: %s"));
38 EXTERN char e_syntax_error_at_str[]
39 	INIT(= N_("E1002: Syntax error at %s"));
40 EXTERN char e_missing_return_value[]
41 	INIT(= N_("E1003: Missing return value"));
42 EXTERN char e_white_space_required_before_and_after_str[]
43 	INIT(= N_("E1004: White space required before and after '%s'"));
44 EXTERN char e_too_many_argument_types[]
45 	INIT(= N_("E1005: Too many argument types"));
46 EXTERN char e_str_is_used_as_argument[]
47 	INIT(= N_("E1006: %s is used as an argument"));
48 EXTERN char e_mandatory_argument_after_optional_argument[]
49 	INIT(= N_("E1007: Mandatory argument after optional argument"));
50 EXTERN char e_missing_type[]
51 	INIT(= N_("E1008: Missing <type>"));
52 EXTERN char e_missing_gt_after_type[]
53 	INIT(= N_("E1009: Missing > after type"));
54 EXTERN char e_type_not_recognized_str[]
55 	INIT(= N_("E1010: Type not recognized: %s"));
56 EXTERN char e_name_too_long_str[]
57 	INIT(= N_("E1011: Name too long: %s"));
58 EXTERN char e_type_mismatch_expected_str_but_got_str[]
59 	INIT(= N_("E1012: Type mismatch; expected %s but got %s"));
60 EXTERN char e_argument_nr_type_mismatch_expected_str_but_got_str[]
61 	INIT(= N_("E1013: Argument %d: type mismatch, expected %s but got %s"));
62 EXTERN char e_invalid_key_str[]
63 	INIT(= N_("E1014: Invalid key: %s"));
64 EXTERN char e_name_expected_str[]
65 	INIT(= N_("E1015: Name expected: %s"));
66 EXTERN char e_cannot_declare_a_scope_variable[]
67 	INIT(= N_("E1016: Cannot declare a %s variable: %s"));
68 EXTERN char e_cannot_declare_an_environment_variable[]
69 	INIT(= N_("E1016: Cannot declare an environment variable: %s"));
70 EXTERN char e_variable_already_declared[]
71 	INIT(= N_("E1017: Variable already declared: %s"));
72 EXTERN char e_cannot_assign_to_constant[]
73 	INIT(= N_("E1018: Cannot assign to a constant: %s"));
74 EXTERN char e_can_only_concatenate_to_string[]
75 	INIT(= N_("E1019: Can only concatenate to string"));
76 EXTERN char e_cannot_use_operator_on_new_variable[]
77 	INIT(= N_("E1020: Cannot use an operator on a new variable: %s"));
78 EXTERN char e_const_requires_a_value[]
79 	INIT(= N_("E1021: Const requires a value"));
80 EXTERN char e_type_or_initialization_required[]
81 	INIT(= N_("E1022: Type or initialization required"));
82 EXTERN char e_using_number_as_bool_nr[]
83 	INIT(= N_("E1023: Using a Number as a Bool: %d"));
84 EXTERN char e_using_number_as_string[]
85 	INIT(= N_("E1024: Using a Number as a String"));
86 EXTERN char e_using_rcurly_outside_if_block_scope[]
87 	INIT(= N_("E1025: Using } outside of a block scope"));
88 EXTERN char e_missing_rcurly[]
89 	INIT(= N_("E1026: Missing }"));
90 EXTERN char e_missing_return_statement[]
91 	INIT(= N_("E1027: Missing return statement"));
92 EXTERN char e_compiling_def_function_failed[]
93 	INIT(= N_("E1028: Compiling :def function failed"));
94 EXTERN char e_expected_str_but_got_str[]
95 	INIT(= N_("E1029: Expected %s but got %s"));
96 EXTERN char e_using_string_as_number_str[]
97 	INIT(= N_("E1030: Using a String as a Number: \"%s\""));
98 EXTERN char e_cannot_use_void_value[]
99 	INIT(= N_("E1031: Cannot use void value"));
100 EXTERN char e_missing_catch_or_finally[]
101 	INIT(= N_("E1032: Missing :catch or :finally"));
102 EXTERN char e_catch_unreachable_after_catch_all[]
103 	INIT(= N_("E1033: Catch unreachable after catch-all"));
104 EXTERN char e_cannot_use_reserved_name[]
105 	INIT(= N_("E1034: Cannot use reserved name %s"));
106 EXTERN char e_percent_requires_number_arguments[]
107 	INIT(= N_("E1035: % requires number arguments"));
108 EXTERN char e_char_requires_number_or_float_arguments[]
109 	INIT(= N_("E1036: %c requires number or float arguments"));
110 EXTERN char e_cannot_use_str_with_str[]
111 	INIT(= N_("E1037: Cannot use \"%s\" with %s"));
112 EXTERN char e_vim9script_can_only_be_used_in_script[]
113 	INIT(= N_("E1038: \"vim9script\" can only be used in a script"));
114 EXTERN char e_vim9script_must_be_first_command_in_script[]
115 	INIT(= N_("E1039: \"vim9script\" must be the first command in a script"));
116 EXTERN char e_cannot_use_scriptversion_after_vim9script[]
117 	INIT(= N_("E1040: Cannot use :scriptversion after :vim9script"));
118 EXTERN char e_redefining_script_item_str[]
119 	INIT(= N_("E1041: Redefining script item %s"));
120 EXTERN char e_export_can_only_be_used_in_vim9script[]
121 	INIT(= N_("E1042: Export can only be used in vim9script"));
122 EXTERN char e_invalid_command_after_export[]
123 	INIT(= N_("E1043: Invalid command after :export"));
124 EXTERN char e_export_with_invalid_argument[]
125 	INIT(= N_("E1044: Export with invalid argument"));
126 EXTERN char e_missing_as_after_star[]
127 	INIT(= N_("E1045: Missing \"as\" after *"));
128 EXTERN char e_missing_comma_in_import[]
129 	INIT(= N_("E1046: Missing comma in import"));
130 EXTERN char e_syntax_error_in_import[]
131 	INIT(= N_("E1047: Syntax error in import"));
132 EXTERN char e_item_not_found_in_script_str[]
133 	INIT(= N_("E1048: Item not found in script: %s"));
134 EXTERN char e_item_not_exported_in_script_str[]
135 	INIT(= N_("E1049: Item not exported in script: %s"));
136 EXTERN char e_colon_required_before_range_str[]
137 	INIT(= N_("E1050: Colon required before a range: %s"));
138 EXTERN char e_wrong_argument_type_for_plus[]
139 	INIT(= N_("E1051: Wrong argument type for +"));
140 EXTERN char e_cannot_declare_an_option[]
141 	INIT(= N_("E1052: Cannot declare an option: %s"));
142 EXTERN char e_could_not_import_str[]
143 	INIT(= N_("E1053: Could not import \"%s\""));
144 EXTERN char e_variable_already_declared_in_script[]
145 	INIT(= N_("E1054: Variable already declared in the script: %s"));
146 EXTERN char e_missing_name_after_dots[]
147 	INIT(= N_("E1055: Missing name after ..."));
148 EXTERN char e_expected_type_str[]
149 	INIT(= N_("E1056: Expected a type: %s"));
150 EXTERN char e_missing_enddef[]
151 	INIT(= N_("E1057: Missing :enddef"));
152 EXTERN char e_function_nesting_too_deep[]
153 	INIT(= N_("E1058: Function nesting too deep"));
154 EXTERN char e_no_white_space_allowed_before_colon_str[]
155 	INIT(= N_("E1059: No white space allowed before colon: %s"));
156 EXTERN char e_expected_dot_after_name_str[]
157 	INIT(= N_("E1060: Expected dot after name: %s"));
158 EXTERN char e_cannot_find_function_str[]
159 	INIT(= N_("E1061: Cannot find function %s"));
160 EXTERN char e_cannot_index_number[]
161 	INIT(= N_("E1062: Cannot index a Number"));
162 EXTERN char e_type_mismatch_for_v_variable[]
163 	INIT(= N_("E1063: Type mismatch for v: variable"));
164 // E1064 unused
165 // E1065 unused
166 EXTERN char e_cannot_declare_a_register_str[]
167 	INIT(= N_("E1066: Cannot declare a register: %s"));
168 EXTERN char e_separator_mismatch_str[]
169 	INIT(= N_("E1067: Separator mismatch: %s"));
170 EXTERN char e_no_white_space_allowed_before_str[]
171 	INIT(= N_("E1068: No white space allowed before '%s'"));
172 EXTERN char e_white_space_required_after_str[]
173 	INIT(= N_("E1069: White space required after '%s'"));
174 EXTERN char e_missing_from[]
175 	INIT(= N_("E1070: Missing \"from\""));
176 EXTERN char e_invalid_string_after_from[]
177 	INIT(= N_("E1071: Invalid string after \"from\""));
178 EXTERN char e_cannot_compare_str_with_str[]
179 	INIT(= N_("E1072: Cannot compare %s with %s"));
180 EXTERN char e_name_already_defined_str[]
181 	INIT(= N_("E1073: Name already defined: %s"));
182 EXTERN char e_no_white_space_allowed_after_dot[]
183 	INIT(= N_("E1074: No white space allowed after dot"));
184 EXTERN char e_namespace_not_supported_str[]
185 	INIT(= N_("E1075: Namespace not supported: %s"));
186 EXTERN char e_this_vim_is_not_compiled_with_float_support[]
187 	INIT(= N_("E1076: This Vim is not compiled with float support"));
188 EXTERN char e_missing_argument_type_for_str[]
189 	INIT(= N_("E1077: Missing argument type for %s"));
190 // E1078 unused
191 // E1079 unused
192 // E1080 unused
193 EXTERN char e_cannot_unlet_str[]
194 	INIT(= N_("E1081: Cannot unlet %s"));
195 EXTERN char e_cannot_use_namespaced_variable[]
196 	INIT(= N_("E1082: Cannot use a namespaced variable: %s"));
197 EXTERN char e_missing_backtick[]
198 	INIT(= N_("E1083: Missing backtick"));
199 EXTERN char e_cannot_delete_vim9_script_function_str[]
200 	INIT(= N_("E1084: Cannot delete Vim9 script function %s"));
201 EXTERN char e_not_callable_type_str[]
202 	INIT(= N_("E1085: Not a callable type: %s"));
203 EXTERN char e_cannot_use_function_inside_def[]
204 	INIT(= N_("E1086: Cannot use :function inside :def"));
205 EXTERN char e_cannot_use_index_when_declaring_variable[]
206 	INIT(= N_("E1087: Cannot use an index when declaring a variable"));
207 // E1088 unused
208 EXTERN char e_unknown_variable_str[]
209 	INIT(= N_("E1089: Unknown variable: %s"));
210 EXTERN char e_cannot_assign_to_argument[]
211 	INIT(= N_("E1090: Cannot assign to argument %s"));
212 EXTERN char e_function_is_not_compiled_str[]
213 	INIT(= N_("E1091: Function is not compiled: %s"));
214 EXTERN char e_cannot_use_list_for_declaration[]
215 	INIT(= N_("E1092: Cannot use a list for a declaration"));
216 EXTERN char e_expected_nr_items_but_got_nr[]
217 	INIT(= N_("E1093: Expected %d items but got %d"));
218 EXTERN char e_import_can_only_be_used_in_script[]
219 	INIT(= N_("E1094: Import can only be used in a script"));
220 EXTERN char e_unreachable_code_after_return[]
221 	INIT(= N_("E1095: Unreachable code after :return"));
222 EXTERN char e_returning_value_in_function_without_return_type[]
223 	INIT(= N_("E1096: Returning a value in a function without a return type"));
224 EXTERN char e_line_incomplete[]
225 	INIT(= N_("E1097: Line incomplete"));
226 // E1098 unused
227 EXTERN char e_unknown_error_while_executing_str[]
228 	INIT(= N_("E1099: Unknown error while executing %s"));
229 EXTERN char e_cannot_declare_script_variable_in_function[]
230 	INIT(= N_("E1101: Cannot declare a script variable in a function: %s"));
231 EXTERN char e_lambda_function_not_found_str[]
232 	INIT(= N_("E1102: Lambda function not found: %s"));
233 EXTERN char e_dictionary_not_set[]
234 	INIT(= N_("E1103: Dictionary not set"));
235 EXTERN char e_missing_gt[]
236 	INIT(= N_("E1104: Missing >"));
237 EXTERN char e_cannot_convert_str_to_string[]
238 	INIT(= N_("E1105: Cannot convert %s to string"));
239 EXTERN char e_one_argument_too_many[]
240 	INIT(= N_("E1106: One argument too many"));
241 EXTERN char e_nr_arguments_too_many[]
242 	INIT(= N_("E1106: %d arguments too many"));
243 EXTERN char e_string_list_dict_or_blob_required[]
244 	INIT(= N_("E1107: String, List, Dict or Blob required"));
245 EXTERN char e_item_not_found_str[]
246 	INIT(= N_("E1108: Item not found: %s"));
247 EXTERN char e_list_item_nr_is_not_list[]
248 	INIT(= N_("E1109: List item %d is not a List"));
249 EXTERN char e_list_item_nr_does_not_contain_3_numbers[]
250 	INIT(= N_("E1110: List item %d does not contain 3 numbers"));
251 EXTERN char e_list_item_nr_range_invalid[]
252 	INIT(= N_("E1111: List item %d range invalid"));
253 EXTERN char e_list_item_nr_cell_width_invalid[]
254 	INIT(= N_("E1112: List item %d cell width invalid"));
255 EXTERN char e_overlapping_ranges_for_nr[]
256 	INIT(= N_("E1113: Overlapping ranges for 0x%lx"));
257 EXTERN char e_only_values_of_0x100_and_higher_supported[]
258 	INIT(= N_("E1114: Only values of 0x100 and higher supported"));
259 EXTERN char e_assert_fails_fourth_argument[]
260 	INIT(= N_("E1115: \"assert_fails()\" fourth argument must be a number"));
261 EXTERN char e_assert_fails_fifth_argument[]
262 	INIT(= N_("E1116: \"assert_fails()\" fifth argument must be a string"));
263 EXTERN char e_cannot_use_bang_with_nested_def[]
264 	INIT(= N_("E1117: Cannot use ! with nested :def"));
265 EXTERN char e_cannot_change_list[]
266 	INIT(= N_("E1118: Cannot change list"));
267 EXTERN char e_cannot_change_list_item[]
268 	INIT(= N_("E1119: Cannot change list item"));
269 EXTERN char e_cannot_change_dict[]
270 	INIT(= N_("E1120: Cannot change dict"));
271 EXTERN char e_cannot_change_dict_item[]
272 	INIT(= N_("E1121: Cannot change dict item"));
273 EXTERN char e_variable_is_locked_str[]
274 	INIT(= N_("E1122: Variable is locked: %s"));
275 EXTERN char e_missing_comma_before_argument_str[]
276 	INIT(= N_("E1123: Missing comma before argument: %s"));
277 EXTERN char e_str_cannot_be_used_in_legacy_vim_script[]
278 	INIT(= N_("E1124: \"%s\" cannot be used in legacy Vim script"));
279 EXTERN char e_final_requires_a_value[]
280 	INIT(= N_("E1125: Final requires a value"));
281 EXTERN char e_cannot_use_let_in_vim9_script[]
282 	INIT(= N_("E1126: Cannot use :let in Vim9 script"));
283 EXTERN char e_missing_name_after_dot[]
284 	INIT(= N_("E1127: Missing name after dot"));
285 EXTERN char e_endblock_without_block[]
286 	INIT(= N_("E1128: } without {"));
287 EXTERN char e_throw_with_empty_string[]
288 	INIT(= N_("E1129: Throw with empty string"));
289 EXTERN char e_cannot_add_to_null_list[]
290 	INIT(= N_("E1130: Cannot add to null list"));
291 EXTERN char e_cannot_add_to_null_blob[]
292 	INIT(= N_("E1131: Cannot add to null blob"));
293 EXTERN char e_missing_function_argument[]
294 	INIT(= N_("E1132: Missing function argument"));
295 EXTERN char e_cannot_extend_null_dict[]
296 	INIT(= N_("E1133: Cannot extend a null dict"));
297 EXTERN char e_cannot_extend_null_list[]
298 	INIT(= N_("E1134: Cannot extend a null list"));
299 EXTERN char e_using_string_as_bool_str[]
300 	INIT(= N_("E1135: Using a String as a Bool: \"%s\""));
301 #endif
302 EXTERN char e_cmd_mapping_must_end_with_cr[]
303 	INIT(=N_("E1135: <Cmd> mapping must end with <CR>"));
304 EXTERN char e_cmd_mapping_must_end_with_cr_before_second_cmd[]
305 	INIT(=N_("E1136: <Cmd> mapping must end with <CR> before second <Cmd>"));
306 EXTERN char e_cmd_maping_must_not_include_str_key[]
307 	INIT(= N_("E1137: <Cmd> mapping must not include %s key"));
308 EXTERN char e_using_bool_as_number[]
309 	INIT(= N_("E1138: Using a Bool as a Number"));
310 EXTERN char e_missing_matching_bracket_after_dict_key[]
311 	INIT(= N_("E1139: Missing matching bracket after dict key"));
312 EXTERN char e_for_argument_must_be_sequence_of_lists[]
313 	INIT(= N_("E1140: For argument must be a sequence of lists"));
314 EXTERN char e_indexable_type_required[]
315 	INIT(= N_("E1141: Indexable type required"));
316 EXTERN char e_non_empty_string_required[]
317 	INIT(= N_("E1142: Non-empty string required"));
318 EXTERN char e_empty_expression_str[]
319 	INIT(= N_("E1143: Empty expression: \"%s\""));
320 EXTERN char e_command_not_followed_by_white_space_str[]
321 	INIT(= N_("E1144: Command is not followed by white space: %s"));
322 EXTERN char e_missing_heredoc_end_marker_str[]
323 	INIT(= N_("E1145: Missing heredoc end marker: %s"));
324 EXTERN char e_command_not_recognized_str[]
325 	INIT(= N_("E1146: Command not recognized: %s"));
326 EXTERN char e_list_not_set[]
327 	INIT(= N_("E1147: List not set"));
328 EXTERN char e_cannot_index_str[]
329 	INIT(= N_("E1148: Cannot index a %s"));
330 EXTERN char e_script_variable_invalid_after_reload_in_function_str[]
331 	INIT(= N_("E1149: Script variable is invalid after reload in function %s"));
332 EXTERN char e_script_variable_type_changed[]
333 	INIT(= N_("E1150: Script variable type changed"));
334