From 436b5adc9770a2568209dd5ab1f98bd1afc91898 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 31 Dec 2021 22:49:24 +0000 Subject: patch 8.2.3961: error messages are spread out Problem: Error messages are spread out. Solution: Move more errors to errors.h. --- src/channel.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/channel.c') diff --git a/src/channel.c b/src/channel.c index 05e248933b..5133440173 100644 --- a/src/channel.c +++ b/src/channel.c @@ -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) -- cgit v1.2.3