diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-06-27 22:03:33 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-27 22:03:33 +0200 |
commit | 108010aa4720ef023a8ac59004fc0f2bc11125af (patch) | |
tree | 831741a42644a86ee0d74679361f74cc27861eaa /src/eval.c | |
parent | d887297ad0164516dd52cdab0308c3626337d124 (diff) |
patch 8.2.3069: error messages are spread outv8.2.3069
Problem: Error messages are spread out.
Solution: Move some error messages to errors.h. Use clearer names.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/eval.c b/src/eval.c index 7990c23f00..f57001647c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -216,7 +216,7 @@ eval1_emsg(char_u **arg, typval_T *rettv, exarg_T *eap) // Also check called_emsg for when using assert_fails(). if (!aborting() && did_emsg == did_emsg_before && called_emsg == called_emsg_before) - semsg(_(e_invexpr2), start); + semsg(_(e_invalid_expression_str), start); } clear_evalarg(&evalarg, eap); return ret; @@ -297,7 +297,7 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv) if (*skipwhite(s) != NUL) // check for trailing chars after expr { clear_tv(rettv); - semsg(_(e_invexpr2), s); + semsg(_(e_invalid_expression_str), s); return FAIL; } } @@ -2268,7 +2268,7 @@ eval0( if (end_error) semsg(_(e_trailing_arg), p); else - semsg(_(e_invexpr2), arg); + semsg(_(e_invalid_expression_str), arg); } // Some of the expression may not have been consumed. Do not check for @@ -2758,7 +2758,7 @@ eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg) if (vim9script && type_is && (p[len] == '?' || p[len] == '#')) { - semsg(_(e_invexpr2), p); + semsg(_(e_invalid_expression_str), p); clear_tv(rettv); return FAIL; } @@ -3367,7 +3367,7 @@ eval_leader(char_u **arg, int vim9) // ++, --, -+ and +- are not accepted in Vim9 script if (vim9 && (*p == '-' || *p == '+') && (*n == '-' || *n == '+')) { - semsg(_(e_invexpr2), s); + semsg(_(e_invalid_expression_str), s); return FAIL; } p = n; @@ -3441,7 +3441,7 @@ eval7( #endif )) { - semsg(_(e_invexpr2), *arg); + semsg(_(e_invalid_expression_str), *arg); ++*arg; return FAIL; } @@ -5607,7 +5607,7 @@ get_name_len( // Only give an error when there is something, otherwise it will be // reported at a higher level. if (len == 0 && verbose && **arg != NUL) - semsg(_(e_invexpr2), *arg); + semsg(_(e_invalid_expression_str), *arg); return len; } @@ -6153,7 +6153,7 @@ ex_echo(exarg_T *eap) */ if (!aborting() && did_emsg == did_emsg_before && called_emsg == called_emsg_before) - semsg(_(e_invexpr2), arg_start); + semsg(_(e_invalid_expression_str), arg_start); need_clr_eos = FALSE; break; } |