Mercurial > vim
comparison src/ex_eval.c @ 26948:51ddf6740ac6 v8.2.4003
patch 8.2.4003: error messages are spread out
Commit: https://github.com/vim/vim/commit/d88be5be80f47826397d12ffc90150a443821f2b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 4 19:57:55 2022 +0000
patch 8.2.4003: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 04 Jan 2022 21:00:05 +0100 |
parents | d91aea2a612c |
children | b34ddbca305c |
comparison
equal
deleted
inserted
replaced
26947:81d60d47ba32 | 26948:51ddf6740ac6 |
---|---|
519 { | 519 { |
520 if (STRNCMP((char_u *)value, "Vim", 3) == 0 | 520 if (STRNCMP((char_u *)value, "Vim", 3) == 0 |
521 && (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':' | 521 && (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':' |
522 || ((char_u *)value)[3] == '(')) | 522 || ((char_u *)value)[3] == '(')) |
523 { | 523 { |
524 emsg(_("E608: Cannot :throw exceptions with 'Vim' prefix")); | 524 emsg(_(e_cannot_throw_exceptions_with_vim_prefix)); |
525 goto fail; | 525 goto fail; |
526 } | 526 } |
527 } | 527 } |
528 | 528 |
529 excp = ALLOC_ONE(except_T); | 529 excp = ALLOC_ONE(except_T); |
1622 | 1622 |
1623 if (cmdmod_error(FALSE)) | 1623 if (cmdmod_error(FALSE)) |
1624 return; | 1624 return; |
1625 | 1625 |
1626 if (cstack->cs_idx == CSTACK_LEN - 1) | 1626 if (cstack->cs_idx == CSTACK_LEN - 1) |
1627 eap->errmsg = _("E601: :try nesting too deep"); | 1627 eap->errmsg = _(e_try_nesting_too_deep); |
1628 else | 1628 else |
1629 { | 1629 { |
1630 enter_block(cstack); | 1630 enter_block(cstack); |
1631 ++cstack->cs_trylevel; | 1631 ++cstack->cs_trylevel; |
1632 cstack->cs_flags[cstack->cs_idx] = CSF_TRY; | 1632 cstack->cs_flags[cstack->cs_idx] = CSF_TRY; |
1725 cstack->cs_flags[idx] |= CSF_CATCH; | 1725 cstack->cs_flags[idx] |= CSF_CATCH; |
1726 if (cstack->cs_flags[idx] & CSF_FINALLY) | 1726 if (cstack->cs_flags[idx] & CSF_FINALLY) |
1727 { | 1727 { |
1728 // Give up for a ":catch" after ":finally" and ignore it. | 1728 // Give up for a ":catch" after ":finally" and ignore it. |
1729 // Just parse. | 1729 // Just parse. |
1730 eap->errmsg = _("E604: :catch after :finally"); | 1730 eap->errmsg = _(e_catch_after_finally); |
1731 give_up = TRUE; | 1731 give_up = TRUE; |
1732 } | 1732 } |
1733 else | 1733 else |
1734 rewind_conditionals(cstack, idx, CSF_WHILE | CSF_FOR, | 1734 rewind_conditionals(cstack, idx, CSF_WHILE | CSF_FOR, |
1735 &cstack->cs_looplevel); | 1735 &cstack->cs_looplevel); |