Replies: 15 comments 13 replies
-
|
About grouping errors together numerically. Especially after the mention of stack overflow and users catching number; by this time, most users wouldn't be able to tell anything from the code value (unless it's one they see a lot). The main beneficiary of grouping might be the developers looking for messages about a particular issue. |
Beta Was this translation helpful? Give feedback.
-
|
On 2023-10-01, Restorer wrote:
Perhaps future codes can and should be grouped?
The question is by what principle to group the messages.
Is it worth making groups for each Vim command (function). Or should they be
grouped by data types, or by Vim modes?
In my opinion, a good starting point would be the features available in the
editor combined with the already existing categorization for built-in
functions.
But whichever variant is adopted, there should necessarily be separate groups,
it seems to me, for cases that don't fall under any of the criteria (and there
are and will be such messages) and a group for internal Vim errors.
I like your proposals so far, but I don't think this really matters.
Since we have one central repository for the code, I don't think
there's much chance of two committers using the same code, and if
they do, it's easy to fix. The error codes themselves have never
conveyed any information that I know of. All the information has
been in the error message. And when that's not enough, there is
:help on the error code.
As you have discovered, it isn't easy to come up with a consistent,
meaningful scheme for assigning numbers, either. And if some block
of error codes is ever filled, you're back to choosing a next code
that doesn't follow that scheme.
Regards,
Gary
|
Beta Was this translation helpful? Give feedback.
-
The question is by what principle to group the messages. |
Beta Was this translation helpful? Give feedback.
-
|
I've sketched out some guidelines for composing messages in Vim. Please excuse my English. It is possible that the meaning of some phrases may be lost because of it. To discuss. In error messages, functions are often specified as FunName(). Should it be enclosed in quotes in this case? As I understand, any programmer will immediately realize that these are function names (and I, not a programmer, can guess what they are). In my opinion, it is not necessary to enclose in quotes in this case. To discuss. In the documentation, command names are now framed with backquote characters. Perhaps we should do the same in messages to maintain consistency with the documentation and make it easier for the user to find help. |
Beta Was this translation helpful? Give feedback.
-
|
For something like should the class be the one that's being referenced, or the super class where it's defined? |
Beta Was this translation helpful? Give feedback.
-
|
Examples with questions for consideration. For
Or could just leave out class/object and use the same message for both For the purpose of reporting the problem, "Cannot access private", "not writable", |
Beta Was this translation helpful? Give feedback.
-
|
Maybe new printf messages could start at |
Beta Was this translation helpful? Give feedback.
-
|
For reference, the following is a list of new error messages introduced after the Vim 9.0 release: |
Beta Was this translation helpful? Give feedback.
-
|
@errael , @yegappan otherwise, it turns out a complete discrepancy |
Beta Was this translation helpful? Give feedback.
-
|
We should come up with the guidelines for new error messages. We can update the recently added error |
Beta Was this translation helpful? Give feedback.
-
I have some experience with this and was forced to 'learn' half a dozen new languages prior to the Vim9 release. If there are extensive changes then the onus should probably be on the project to provide updates for the translators to approve. Like most global runtime maintenance issues this can be a little like herding cats. Perhaps more significantly, error codes are essentially pseudo-exception types. See |
Beta Was this translation helpful? Give feedback.
-
|
In this message, it doesn't include the class Here's one place it's used, private message doesn't use class, the other does. |
Beta Was this translation helpful? Give feedback.
-
|
Here's some specific vim9 related message issues Maybe biggest issue is to get messages in sync with spec. Note member versus variable; variable versus method Are both these needed |
Beta Was this translation helpful? Give feedback.
-
|
Very good discussion!
|
Beta Was this translation helpful? Give feedback.
-
|
In #13136 there's a suggested change to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The goal of this discussion is to put together a guide for crafting error messages throughout vim; eventually the guide can be incorporated into the developer docs. You can add you comments and preferences. In addition, specific messages that aren't right, or should be improved, can be mentioned.
Here's some initial comments copied from elsewhere. The initial focus is vim9class.
There's some comments on selecting a message in #13068
Change E46 to E1335 as appropriate for vim9class
Beta Was this translation helpful? Give feedback.
All reactions