Basic idea is turn all error messages into objects with a code (e.g. invalid-pick/missing-else) and optionally some data.
Then, like with the previous work on this topic, that code is used in links to documentation.
Major difference is that all errors would be required to have a code. This allows us to force documentation to be up-to-date by ensuring that all error types are listed.
Thoughts:
This could also allow complicated errors to store multiple locations in them (e.g. "invalid [usage], defined [here]")
Very much a WIP at this stage
Basic idea is turn all error messages into objects with a
code
(e.g.invalid-pick/missing-else
) and optionally some data.Then, like with the previous work on this topic, that
code
is used in links to documentation.Major difference is that all errors would be required to have a code. This allows us to force documentation to be up-to-date by ensuring that all error types are listed.
Thoughts: