0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.3967: error messages are spread out

Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
This commit is contained in:
Bram Moolenaar
2022-01-01 14:19:49 +00:00
parent b37a65e4bf
commit 460ae5dfca
70 changed files with 403 additions and 334 deletions

View File

@@ -997,7 +997,7 @@ get_lval(
if (len == 0)
{
if (!quiet)
emsg(_(e_emptykey));
emsg(_(e_cannot_use_empty_key_for_dictionary));
return NULL;
}
p = key + len;
@@ -1148,7 +1148,7 @@ get_lval(
if (lp->ll_dict == get_vimvar_dict()
|| &lp->ll_dict->dv_hashtab == get_funccal_args_ht())
{
semsg(_(e_illvar), name);
semsg(_(e_illegal_variable_name_str), name);
clear_tv(&var1);
return NULL;
}
@@ -1157,7 +1157,7 @@ get_lval(
if (*p == '[' || *p == '.' || unlet)
{
if (!quiet)
semsg(_(e_dictkey), key);
semsg(_(e_key_not_present_in_dictionary), key);
clear_tv(&var1);
return NULL;
}
@@ -1306,7 +1306,7 @@ set_var_lval(
if (op != NULL && *op != '=')
{
semsg(_(e_letwrong), op);
semsg(_(e_wrong_variable_type_for_str_equal), op);
return;
}
if (value_check_lock(lp->ll_blob->bv_lock, lp->ll_name, FALSE))
@@ -1335,7 +1335,7 @@ set_var_lval(
if ((flags & (ASSIGN_CONST | ASSIGN_FINAL))
&& (flags & ASSIGN_FOR_LOOP) == 0)
{
emsg(_(e_cannot_mod));
emsg(_(e_cannot_modify_existing_variable));
*endp = cc;
return;
}
@@ -1401,7 +1401,7 @@ set_var_lval(
{
if (op != NULL && *op != '=')
{
semsg(_(e_dictkey), lp->ll_newkey);
semsg(_(e_key_not_present_in_dictionary), lp->ll_newkey);
return;
}
if (dict_wrong_func_name(lp->ll_tv->vval.v_dict, rettv,
@@ -1590,7 +1590,7 @@ tv_op(typval_T *tv1, typval_T *tv2, char_u *op)
}
}
semsg(_(e_letwrong), op);
semsg(_(e_wrong_variable_type_for_str_equal), op);
return FAIL;
}
@@ -3248,7 +3248,7 @@ eval6(
}
else
{
emsg(_(e_modulus));
emsg(_(e_cannot_use_percent_with_float));
return FAIL;
}
rettv->v_type = VAR_FLOAT;
@@ -4325,7 +4325,7 @@ eval_index_inner(
{
if (keylen > 0)
key[keylen] = NUL;
semsg(_(e_dictkey), key);
semsg(_(e_key_not_present_in_dictionary), key);
}
return FAIL;
}