summaryrefslogtreecommitdiff
path: root/src/vim9cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-31 22:49:24 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-31 22:49:24 +0000
commit436b5adc9770a2568209dd5ab1f98bd1afc91898 (patch)
tree623dc85ee9a396b16f939f44d38138f882edc229 /src/vim9cmds.c
parentf1474d801bbdb73406dd3d1f931f515f99e86dfa (diff)
downloadvim-git-436b5adc9770a2568209dd5ab1f98bd1afc91898.tar.gz
patch 8.2.3961: error messages are spread outv8.2.3961
Problem: Error messages are spread out. Solution: Move more errors to errors.h.
Diffstat (limited to 'src/vim9cmds.c')
-rw-r--r--src/vim9cmds.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vim9cmds.c b/src/vim9cmds.c
index eb28a7922..ad54659d8 100644
--- a/src/vim9cmds.c
+++ b/src/vim9cmds.c
@@ -1016,7 +1016,7 @@ compile_endfor(char_u *arg, cctx_T *cctx)
if (scope == NULL || scope->se_type != FOR_SCOPE)
{
- emsg(_(e_for));
+ emsg(_(e_endfor_without_for));
return NULL;
}
forscope = &scope->se_u.se_for;
@@ -1109,7 +1109,7 @@ compile_endwhile(char_u *arg, cctx_T *cctx)
return NULL;
if (scope == NULL || scope->se_type != WHILE_SCOPE)
{
- emsg(_(e_while));
+ emsg(_(e_endwhile_without_while));
return NULL;
}
cctx->ctx_scope = scope->se_outer;
@@ -1328,7 +1328,7 @@ compile_catch(char_u *arg, cctx_T *cctx UNUSED)
// Error if not in a :try scope
if (scope == NULL || scope->se_type != TRY_SCOPE)
{
- emsg(_(e_catch));
+ emsg(_(e_catch_without_try));
return NULL;
}
@@ -1447,7 +1447,7 @@ compile_finally(char_u *arg, cctx_T *cctx)
// Error if not in a :try scope
if (scope == NULL || scope->se_type != TRY_SCOPE)
{
- emsg(_(e_finally));
+ emsg(_(e_finally_without_try));
return NULL;
}
@@ -1457,7 +1457,7 @@ compile_finally(char_u *arg, cctx_T *cctx)
isn = ((isn_T *)instr->ga_data) + scope->se_u.se_try.ts_try_label;
if (isn->isn_arg.tryref.try_ref->try_finally != 0)
{
- emsg(_(e_finally_dup));
+ emsg(_(e_multiple_finally));
return NULL;
}
@@ -1518,7 +1518,7 @@ compile_endtry(char_u *arg, cctx_T *cctx)
if (scope == NULL || scope->se_type != TRY_SCOPE)
{
if (scope == NULL)
- emsg(_(e_no_endtry));
+ emsg(_(e_endtry_without_try));
else if (scope->se_type == WHILE_SCOPE)
emsg(_(e_missing_endwhile));
else if (scope->se_type == FOR_SCOPE)