0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05:00

patch 8.2.3961: 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
2021-12-31 22:49:24 +00:00
parent f1474d801b
commit 436b5adc97
62 changed files with 427 additions and 403 deletions

View File

@@ -1318,7 +1318,7 @@ channel_open_func(typval_T *argvars)
if (argvars[1].v_type != VAR_UNKNOWN
&& (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL))
{
emsg(_(e_invarg));
emsg(_(e_invalid_argument));
return NULL;
}
@@ -1330,7 +1330,7 @@ channel_open_func(typval_T *argvars)
p = vim_strchr(address + 1, ']');
if (p == NULL || *++p != ':')
{
semsg(_(e_invarg2), address);
semsg(_(e_invalid_argument_str), address);
return NULL;
}
}
@@ -1339,14 +1339,14 @@ channel_open_func(typval_T *argvars)
p = vim_strchr(address, ':');
if (p == NULL)
{
semsg(_(e_invarg2), address);
semsg(_(e_invalid_argument_str), address);
return NULL;
}
}
port = strtol((char *)(p + 1), &rest, 10);
if (*address == NUL || port <= 0 || port >= 65536 || *rest != NUL)
{
semsg(_(e_invarg2), address);
semsg(_(e_invalid_argument_str), address);
return NULL;
}
if (is_ipv6)
@@ -1367,7 +1367,7 @@ channel_open_func(typval_T *argvars)
goto theend;
if (opt.jo_timeout < 0)
{
emsg(_(e_invarg));
emsg(_(e_invalid_argument));
goto theend;
}
@@ -3833,7 +3833,7 @@ get_channel_arg(typval_T *tv, int check_open, int reading, ch_part_T part)
}
else
{
semsg(_(e_invarg2), tv_get_string(tv));
semsg(_(e_invalid_argument_str), tv_get_string(tv));
return NULL;
}
if (channel != NULL && reading)