Mercurial > vim
comparison src/userfunc.c @ 17732:1726c2db81bf v8.1.1863
patch 8.1.1863: confusing error when using a builtin function as method
commit https://github.com/vim/vim/commit/9174639a82799011cfa0013cbc4c4709b3833bf0
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 16 22:22:31 2019 +0200
patch 8.1.1863: confusing error when using a builtin function as method
Problem: Confusing error when using a builtin function as method while it
does not support that.
Solution: Add a specific error message.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 16 Aug 2019 22:30:04 +0200 |
parents | 121bdff812b4 |
children | 117c7795a979 |
comparison
equal
deleted
inserted
replaced
17731:314da6ab06bd | 17732:1726c2db81bf |
---|---|
1676 switch (error) | 1676 switch (error) |
1677 { | 1677 { |
1678 case ERROR_UNKNOWN: | 1678 case ERROR_UNKNOWN: |
1679 emsg_funcname(N_("E117: Unknown function: %s"), name); | 1679 emsg_funcname(N_("E117: Unknown function: %s"), name); |
1680 break; | 1680 break; |
1681 case ERROR_NOTMETHOD: | |
1682 emsg_funcname( | |
1683 N_("E276: Cannot use function as a method: %s"), | |
1684 name); | |
1685 break; | |
1681 case ERROR_DELETED: | 1686 case ERROR_DELETED: |
1682 emsg_funcname(N_("E933: Function was deleted: %s"), name); | 1687 emsg_funcname(N_("E933: Function was deleted: %s"), name); |
1683 break; | 1688 break; |
1684 case ERROR_TOOMANY: | 1689 case ERROR_TOOMANY: |
1685 emsg_funcname((char *)e_toomanyarg, name); | 1690 emsg_funcname((char *)e_toomanyarg, name); |
1686 break; | 1691 break; |
1687 case ERROR_TOOFEW: | 1692 case ERROR_TOOFEW: |
1688 emsg_funcname(N_("E119: Not enough arguments for function: %s"), | 1693 emsg_funcname( |
1694 N_("E119: Not enough arguments for function: %s"), | |
1689 name); | 1695 name); |
1690 break; | 1696 break; |
1691 case ERROR_SCRIPT: | 1697 case ERROR_SCRIPT: |
1692 emsg_funcname(N_("E120: Using <SID> not in a script context: %s"), | 1698 emsg_funcname( |
1699 N_("E120: Using <SID> not in a script context: %s"), | |
1693 name); | 1700 name); |
1694 break; | 1701 break; |
1695 case ERROR_DICT: | 1702 case ERROR_DICT: |
1696 emsg_funcname(N_("E725: Calling dict function without Dictionary: %s"), | 1703 emsg_funcname( |
1704 N_("E725: Calling dict function without Dictionary: %s"), | |
1697 name); | 1705 name); |
1698 break; | 1706 break; |
1699 } | 1707 } |
1700 } | 1708 } |
1701 | 1709 |