Mercurial > vim
comparison src/vim9instr.c @ 28263:c446812efd60 v8.2.4657
patch 8.2.4657: errors for functions are sometimes hard to read
Commit: https://github.com/vim/vim/commit/a6c18d38ca2df0a92403f2265a480d9dba08290f
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 31 20:02:56 2022 +0100
patch 8.2.4657: errors for functions are sometimes hard to read
Problem: Errors for functions are sometimes hard to read.
Solution: Use printable_func_name() in more places.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 31 Mar 2022 21:15:03 +0200 |
parents | 20f6b0cdf38c |
children | d550054e1328 |
comparison
equal
deleted
inserted
replaced
28262:59a7125e87f4 | 28263:c446812efd60 |
---|---|
1515 compile_type, NULL) == FAIL) | 1515 compile_type, NULL) == FAIL) |
1516 return FAIL; | 1516 return FAIL; |
1517 } | 1517 } |
1518 if (ufunc->uf_def_status == UF_COMPILE_ERROR) | 1518 if (ufunc->uf_def_status == UF_COMPILE_ERROR) |
1519 { | 1519 { |
1520 emsg_funcname(_(e_call_to_function_that_failed_to_compile_str), | 1520 emsg_funcname(e_call_to_function_that_failed_to_compile_str, |
1521 ufunc->uf_name); | 1521 ufunc->uf_name); |
1522 return FAIL; | 1522 return FAIL; |
1523 } | 1523 } |
1524 | 1524 |
1525 if ((isn = generate_instr(cctx, | 1525 if ((isn = generate_instr(cctx, |
1592 { | 1592 { |
1593 int varargs = (type->tt_flags & TTFLAG_VARARGS) ? 1 : 0; | 1593 int varargs = (type->tt_flags & TTFLAG_VARARGS) ? 1 : 0; |
1594 | 1594 |
1595 if (argcount < type->tt_min_argcount - varargs) | 1595 if (argcount < type->tt_min_argcount - varargs) |
1596 { | 1596 { |
1597 semsg(_(e_not_enough_arguments_for_function_str), name); | 1597 emsg_funcname(e_not_enough_arguments_for_function_str, name); |
1598 return FAIL; | 1598 return FAIL; |
1599 } | 1599 } |
1600 if (!varargs && argcount > type->tt_argcount) | 1600 if (!varargs && argcount > type->tt_argcount) |
1601 { | 1601 { |
1602 semsg(_(e_too_many_arguments_for_function_str), name); | 1602 emsg_funcname(e_too_many_arguments_for_function_str, name); |
1603 return FAIL; | 1603 return FAIL; |
1604 } | 1604 } |
1605 if (type->tt_args != NULL) | 1605 if (type->tt_args != NULL) |
1606 { | 1606 { |
1607 int i; | 1607 int i; |