While working on VimL parser I have seen *very* large number of these cryptic
error messages. I.e. consider the following line:
sort no/some long regex/
. This will give you `E474: Invalid argument` with no further explanation or an
exact position where error is located. I.e. it is indicating that you have a
error somewhere, but where? Maybe it is an error in regex (one needs to know
that Vim is written in a way that regexes never throw E474 to say this is
false), maybe one should not have omitted space or whatever. One needs to read
documentation thoroughly to determine what is wrong, but even this does not
always help: I cannot find any information about the fact that `n`, `o` and `x`
cannot be used together anywhere in `:sort` documentation.
In my parser I change all of these errors to something like “E474: Can only
specify one kind of numeric sort” (and always assigning a position, but this
part cannot be changed so easily), never using “E47(4|5): Invalid argument” or
“E15: Invalid expression”.
More or less full list of such changes to these messages (and not only to
messages, but this is irrelevant) is located at
https://gist.github.com//4af839e000e7eada347d (it is supposed to be full, but I
started writing it some time after I started writing the parser). I am posting
this message to vim-dev to hear Bram opinion about this and also as a
notification in case somebody will want to port these changes.
Note: in order not to break backwards compatibility all new messages look like
“E474: …”, no new number is assigned. Since the following message text is
supposed to be localized and theoretically is a subject to typo corrections it
must not be relied on and changing it is not going to break compatibility.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.