vimerror-code

How can I figure out the meaning of a Vim error code?


The way Vim handles error or exception is to give an error code like E107 with a piece of message like Unknown function: a. To figure out the details about an error code I can use :h E107 or trigger the error to see what will happen.

However, some error codes remain opaque to me since the document just list them rather than giving a description. For example, the document of E107 also list the code E117, but the meaning of it is not stated clearly. What's worse, :h E107 shows that there is no individual document for this error code.

Below is the relevant document. Since the paragraph mentions range a lot, I guess E117 is to do range.

                                          :cal :call E107 E117
:[range]cal[l] {name}([arguments])
        Call a function.  The name of the function and its arguments
        are as specified with |:function|.  Up to 20 arguments can be
        used.  The returned value is discarded.
        Without a range and for functions that accept a range, the
        function is called once.  When a range is given the cursor is
        positioned at the start of the first line before executing the
        function.
        When a range is given and the function doesn't handle it
        itself, the function is executed for each line in the range,
        with the cursor in the first column of that line.  The cursor
        is left at the last line (possibly moved by the last function
        call).

As I am quite new to the errors that vim can produce, all I can do is guessing. Generally speaking, is there a better way I can figure out the meaning of a Vim error code? Thanks a lot.


Solution

  • No, there's unfortunately no better way and I'm not aware of a crowd-sourced resource either. Though that would be an interesting week-end project.