Mercurial > vim
comparison src/vim9expr.c @ 26883:7f150a4936f2 v8.2.3970
patch 8.2.3970: error messages are spread out
Commit: https://github.com/vim/vim/commit/74409f62790a93daf0965c71da01ff76aa0fa5a5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 1 15:58:22 2022 +0000
patch 8.2.3970: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Jan 2022 17:00:04 +0100 |
parents | 06a137af96f8 |
children | 612339679616 |
comparison
equal
deleted
inserted
replaced
26882:196f4d7e2a38 | 26883:7f150a4936f2 |
---|---|
515 | 515 |
516 if (expr_res == FAIL || trailing_error | 516 if (expr_res == FAIL || trailing_error |
517 || GA_GROW_FAILS(&cctx->ctx_instr, 1)) | 517 || GA_GROW_FAILS(&cctx->ctx_instr, 1)) |
518 { | 518 { |
519 if (trailing_error) | 519 if (trailing_error) |
520 semsg(_(e_trailing_arg), s); | 520 semsg(_(e_trailing_characters_str), s); |
521 clear_instr_ga(&cctx->ctx_instr); | 521 clear_instr_ga(&cctx->ctx_instr); |
522 cctx->ctx_instr = save_ga; | 522 cctx->ctx_instr = save_ga; |
523 ++cctx->ctx_type_stack.ga_len; | 523 ++cctx->ctx_type_stack.ga_len; |
524 return FAIL; | 524 return FAIL; |
525 } | 525 } |
1088 if (key != NULL) | 1088 if (key != NULL) |
1089 { | 1089 { |
1090 item = dict_find(d, key, -1); | 1090 item = dict_find(d, key, -1); |
1091 if (item != NULL) | 1091 if (item != NULL) |
1092 { | 1092 { |
1093 semsg(_(e_duplicate_key), key); | 1093 semsg(_(e_duplicate_key_in_dicitonary), key); |
1094 goto failret; | 1094 goto failret; |
1095 } | 1095 } |
1096 item = dictitem_alloc(key); | 1096 item = dictitem_alloc(key); |
1097 if (item != NULL) | 1097 if (item != NULL) |
1098 { | 1098 { |
1106 if (**arg != ':') | 1106 if (**arg != ':') |
1107 { | 1107 { |
1108 if (*skipwhite(*arg) == ':') | 1108 if (*skipwhite(*arg) == ':') |
1109 semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg); | 1109 semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg); |
1110 else | 1110 else |
1111 semsg(_(e_missing_dict_colon), *arg); | 1111 semsg(_(e_missing_colon_in_dictionary), *arg); |
1112 return FAIL; | 1112 return FAIL; |
1113 } | 1113 } |
1114 whitep = *arg + 1; | 1114 whitep = *arg + 1; |
1115 if (!IS_WHITE_OR_NUL(*whitep)) | 1115 if (!IS_WHITE_OR_NUL(*whitep)) |
1116 { | 1116 { |
1138 } | 1138 } |
1139 if (**arg == '}') | 1139 if (**arg == '}') |
1140 break; | 1140 break; |
1141 if (**arg != ',') | 1141 if (**arg != ',') |
1142 { | 1142 { |
1143 semsg(_(e_missing_dict_comma), *arg); | 1143 semsg(_(e_missing_comma_in_dictionary), *arg); |
1144 goto failret; | 1144 goto failret; |
1145 } | 1145 } |
1146 if (IS_WHITE_OR_NUL(*whitep)) | 1146 if (IS_WHITE_OR_NUL(*whitep)) |
1147 { | 1147 { |
1148 semsg(_(e_no_white_space_allowed_before_str_str), ",", whitep); | 1148 semsg(_(e_no_white_space_allowed_before_str_str), ",", whitep); |
1709 { | 1709 { |
1710 // method call: list->method() | 1710 // method call: list->method() |
1711 p = *arg; | 1711 p = *arg; |
1712 if (!eval_isnamec1(*p)) | 1712 if (!eval_isnamec1(*p)) |
1713 { | 1713 { |
1714 semsg(_(e_trailing_arg), pstart); | 1714 semsg(_(e_trailing_characters_str), pstart); |
1715 return FAIL; | 1715 return FAIL; |
1716 } | 1716 } |
1717 if (ASCII_ISALPHA(*p) && p[1] == ':') | 1717 if (ASCII_ISALPHA(*p) && p[1] == ':') |
1718 p += 2; | 1718 p += 2; |
1719 for ( ; eval_isnamec(*p); ++p) | 1719 for ( ; eval_isnamec(*p); ++p) |